aboutsummaryrefslogtreecommitdiff
path: root/include/jemalloc/jemalloc.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/jemalloc/jemalloc.h')
-rw-r--r--include/jemalloc/jemalloc.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/include/jemalloc/jemalloc.h b/include/jemalloc/jemalloc.h
index bbd3ca5..8f88f6d 100644
--- a/include/jemalloc/jemalloc.h
+++ b/include/jemalloc/jemalloc.h
@@ -64,6 +64,7 @@ extern "C" {
* these macro definitions.
*/
#ifndef JEMALLOC_NO_RENAME
+#if defined(__ANDROID__)
# define je_malloc_conf je_malloc_conf
# define je_malloc_message je_malloc_message
# define je_malloc je_malloc
@@ -86,6 +87,30 @@ extern "C" {
# define je_malloc_usable_size je_malloc_usable_size
# define je_memalign je_memalign
# define je_valloc je_valloc
+#else
+# define je_malloc_conf malloc_conf
+# define je_malloc_message malloc_message
+# define je_malloc malloc
+# define je_calloc calloc
+# define je_posix_memalign posix_memalign
+# define je_aligned_alloc aligned_alloc
+# define je_realloc realloc
+# define je_free free
+# define je_mallocx mallocx
+# define je_rallocx rallocx
+# define je_xallocx xallocx
+# define je_sallocx sallocx
+# define je_dallocx dallocx
+# define je_sdallocx sdallocx
+# define je_nallocx nallocx
+# define je_mallctl mallctl
+# define je_mallctlnametomib mallctlnametomib
+# define je_mallctlbymib mallctlbymib
+# define je_malloc_stats_print malloc_stats_print
+# define je_malloc_usable_size malloc_usable_size
+# define je_memalign memalign
+# define je_valloc valloc
+#endif
#endif
#include <stdlib.h>