summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJason Evans <je@fb.com>2012-03-03 01:47:37 (GMT)
committerJason Evans <je@fb.com>2012-03-03 01:47:37 (GMT)
commit7e77eaffffe5c73d44ee64b14ba4b3d7693179d6 (patch)
tree71c25903b997ddb36190f06b4e238830f27916e3 /include
parent7b398aca3bfa558774548ffed6c1a8baba46cc79 (diff)
downloadjemalloc-7e77eaffffe5c73d44ee64b14ba4b3d7693179d6.zip
jemalloc-7e77eaffffe5c73d44ee64b14ba4b3d7693179d6.tar.gz
jemalloc-7e77eaffffe5c73d44ee64b14ba4b3d7693179d6.tar.bz2
Add the --disable-experimental option.
Diffstat (limited to 'include')
-rw-r--r--include/jemalloc/jemalloc.h.in8
-rw-r--r--include/jemalloc/jemalloc_defs.h.in3
2 files changed, 11 insertions, 0 deletions
diff --git a/include/jemalloc/jemalloc.h.in b/include/jemalloc/jemalloc.h.in
index f567ee5..742dadd 100644
--- a/include/jemalloc/jemalloc.h.in
+++ b/include/jemalloc/jemalloc.h.in
@@ -16,6 +16,7 @@ extern "C" {
#include "jemalloc_defs@install_suffix@.h"
+#ifdef JEMALLOC_EXPERIMENTAL
#define ALLOCM_LG_ALIGN(la) (la)
#if LG_SIZEOF_PTR == 2
#define ALLOCM_ALIGN(a) (ffs(a)-1)
@@ -28,6 +29,7 @@ extern "C" {
#define ALLOCM_SUCCESS 0
#define ALLOCM_ERR_OOM 1
#define ALLOCM_ERR_NOT_MOVED 2
+#endif
/*
* The je_ prefix on the following public symbol declarations is an artifact of
@@ -53,6 +55,7 @@ int je_mallctlnametomib(const char *name, size_t *mibp, size_t *miblenp);
int je_mallctlbymib(const size_t *mib, size_t miblen, void *oldp,
size_t *oldlenp, void *newp, size_t newlen);
+#ifdef JEMALLOC_EXPERIMENTAL
int je_allocm(void **ptr, size_t *rsize, size_t size, int flags)
JEMALLOC_ATTR(nonnull(1));
int je_rallocm(void **ptr, size_t *rsize, size_t size, size_t extra,
@@ -61,6 +64,7 @@ int je_sallocm(const void *ptr, size_t *rsize, int flags)
JEMALLOC_ATTR(nonnull(1));
int je_dallocm(void *ptr, int flags) JEMALLOC_ATTR(nonnull(1));
int je_nallocm(size_t *rsize, size_t size, int flags);
+#endif
/*
* By default application code must explicitly refer to mangled symbol names,
@@ -87,12 +91,14 @@ int je_nallocm(size_t *rsize, size_t size, int flags);
#define mallctlbymib je_mallctlbymib
#define memalign je_memalign
#define valloc je_valloc
+#ifdef JEMALLOC_EXPERIMENTAL
#define allocm je_allocm
#define rallocm je_rallocm
#define sallocm je_sallocm
#define dallocm je_dallocm
#define nallocm je_nallocm
#endif
+#endif
/*
* The je_* macros can be used as stable alternative names for the public
@@ -116,12 +122,14 @@ int je_nallocm(size_t *rsize, size_t size, int flags);
#undef je_mallctlbymib
#undef je_memalign
#undef je_valloc
+#ifdef JEMALLOC_EXPERIMENTAL
#undef je_allocm
#undef je_rallocm
#undef je_sallocm
#undef je_dallocm
#undef je_nallocm
#endif
+#endif
#ifdef __cplusplus
};
diff --git a/include/jemalloc/jemalloc_defs.h.in b/include/jemalloc/jemalloc_defs.h.in
index 444950c..049cf01 100644
--- a/include/jemalloc/jemalloc_defs.h.in
+++ b/include/jemalloc/jemalloc_defs.h.in
@@ -108,6 +108,9 @@
/* Support memory filling (junk/zero). */
#undef JEMALLOC_FILL
+/* Support the experimental API. */
+#undef JEMALLOC_EXPERIMENTAL
+
/* Support optional abort() on OOM. */
#undef JEMALLOC_XMALLOC