1/*
2 * By default application code must explicitly refer to mangled symbol names,
3 * so that it is possible to use jemalloc in conjunction with another allocator
4 * in the same application.  Define JEMALLOC_MANGLE in order to cause automatic
5 * name mangling that matches the API prefixing that happened as a result of
6 * --with-mangling and/or --with-jemalloc-prefix configuration settings.
7 */
8#ifdef JEMALLOC_MANGLE
9#  ifndef JEMALLOC_NO_DEMANGLE
10#    define JEMALLOC_NO_DEMANGLE
11#  endif
12#  define malloc_conf je_malloc_conf
13#  define malloc_message je_malloc_message
14#  define malloc je_malloc
15#  define calloc je_calloc
16#  define posix_memalign je_posix_memalign
17#  define aligned_alloc je_aligned_alloc
18#  define realloc je_realloc
19#  define free je_free
20#  define mallocx je_mallocx
21#  define rallocx je_rallocx
22#  define xallocx je_xallocx
23#  define sallocx je_sallocx
24#  define dallocx je_dallocx
25#  define sdallocx je_sdallocx
26#  define nallocx je_nallocx
27#  define mallctl je_mallctl
28#  define mallctlnametomib je_mallctlnametomib
29#  define mallctlbymib je_mallctlbymib
30#  define malloc_stats_print je_malloc_stats_print
31#  define malloc_usable_size je_malloc_usable_size
32#  define memalign je_memalign
33#  define valloc je_valloc
34#endif
35
36/*
37 * The je_* macros can be used as stable alternative names for the
38 * public jemalloc API if JEMALLOC_NO_DEMANGLE is defined.  This is primarily
39 * meant for use in jemalloc itself, but it can be used by application code to
40 * provide isolation from the name mangling specified via --with-mangling
41 * and/or --with-jemalloc-prefix.
42 */
43#ifndef JEMALLOC_NO_DEMANGLE
44#  undef je_malloc_conf
45#  undef je_malloc_message
46#  undef je_malloc
47#  undef je_calloc
48#  undef je_posix_memalign
49#  undef je_aligned_alloc
50#  undef je_realloc
51#  undef je_free
52#  undef je_mallocx
53#  undef je_rallocx
54#  undef je_xallocx
55#  undef je_sallocx
56#  undef je_dallocx
57#  undef je_sdallocx
58#  undef je_nallocx
59#  undef je_mallctl
60#  undef je_mallctlnametomib
61#  undef je_mallctlbymib
62#  undef je_malloc_stats_print
63#  undef je_malloc_usable_size
64#  undef je_memalign
65#  undef je_valloc
66#endif
67