• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 aligned_alloc jet_aligned_alloc
13 #  define calloc jet_calloc
14 #  define dallocx jet_dallocx
15 #  define free jet_free
16 #  define mallctl jet_mallctl
17 #  define mallctlbymib jet_mallctlbymib
18 #  define mallctlnametomib jet_mallctlnametomib
19 #  define malloc jet_malloc
20 #  define malloc_conf jet_malloc_conf
21 #  define malloc_message jet_malloc_message
22 #  define malloc_stats_print jet_malloc_stats_print
23 #  define malloc_usable_size jet_malloc_usable_size
24 #  define mallocx jet_mallocx
25 #  define nallocx jet_nallocx
26 #  define posix_memalign jet_posix_memalign
27 #  define rallocx jet_rallocx
28 #  define realloc jet_realloc
29 #  define sallocx jet_sallocx
30 #  define sdallocx jet_sdallocx
31 #  define xallocx jet_xallocx
32 #  define memalign jet_memalign
33 #  define valloc jet_valloc
34 #endif
35 
36 /*
37  * The jet_* 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 jet_aligned_alloc
45 #  undef jet_calloc
46 #  undef jet_dallocx
47 #  undef jet_free
48 #  undef jet_mallctl
49 #  undef jet_mallctlbymib
50 #  undef jet_mallctlnametomib
51 #  undef jet_malloc
52 #  undef jet_malloc_conf
53 #  undef jet_malloc_message
54 #  undef jet_malloc_stats_print
55 #  undef jet_malloc_usable_size
56 #  undef jet_mallocx
57 #  undef jet_nallocx
58 #  undef jet_posix_memalign
59 #  undef jet_rallocx
60 #  undef jet_realloc
61 #  undef jet_sallocx
62 #  undef jet_sdallocx
63 #  undef jet_xallocx
64 #  undef jet_memalign
65 #  undef jet_valloc
66 #endif
67