aboutsummaryrefslogtreecommitdiff
path: root/include/jemalloc/jemalloc.h
diff options
context:
space:
mode:
authorChristopher Ferris <cferris@google.com>2018-09-13 20:24:10 +0000
committerChristopher Ferris <cferris@google.com>2018-09-13 13:26:39 -0700
commitbb9b1cf919e85d2e4fa45ec625c8ffd582d40a69 (patch)
tree69ab5256fe831cfbeb90db78259c586a1e04cd3e /include/jemalloc/jemalloc.h
parentf4496b278e367a00d90c9ad94bc72e49d39d9a16 (diff)
downloadjemalloc-bb9b1cf919e85d2e4fa45ec625c8ffd582d40a69.tar.gz
We build both static and dynamic libjemalloc and libjemalloc_jet for the host. For the target, only the static libraries are built, just as before. Disable sanitizer for the unit/integration tests on the host. Bug: 113365582 Test: 'mmma external/jemalloc', verify that it builds the same target libraries, verify it builds host libraries and they can be used to build ckati. Change-Id: I84212d0c51995aab25f83deb087d1670ddfb00a8
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>