xref: /netbsd-src/external/bsd/jemalloc.old/include/jemalloc/jemalloc_mangle_jet.h (revision 8e33eff89e26cf71871ead62f0d5063e1313c33a)
1*8e33eff8Schristos /*
2*8e33eff8Schristos  * By default application code must explicitly refer to mangled symbol names,
3*8e33eff8Schristos  * so that it is possible to use jemalloc in conjunction with another allocator
4*8e33eff8Schristos  * in the same application.  Define JEMALLOC_MANGLE in order to cause automatic
5*8e33eff8Schristos  * name mangling that matches the API prefixing that happened as a result of
6*8e33eff8Schristos  * --with-mangling and/or --with-jemalloc-prefix configuration settings.
7*8e33eff8Schristos  */
8*8e33eff8Schristos #ifdef JEMALLOC_MANGLE
9*8e33eff8Schristos #  ifndef JEMALLOC_NO_DEMANGLE
10*8e33eff8Schristos #    define JEMALLOC_NO_DEMANGLE
11*8e33eff8Schristos #  endif
12*8e33eff8Schristos #  define aligned_alloc jet_aligned_alloc
13*8e33eff8Schristos #  define calloc jet_calloc
14*8e33eff8Schristos #  define dallocx jet_dallocx
15*8e33eff8Schristos #  define free jet_free
16*8e33eff8Schristos #  define mallctl jet_mallctl
17*8e33eff8Schristos #  define mallctlbymib jet_mallctlbymib
18*8e33eff8Schristos #  define mallctlnametomib jet_mallctlnametomib
19*8e33eff8Schristos #  define malloc jet_malloc
20*8e33eff8Schristos #  define malloc_conf jet_malloc_conf
21*8e33eff8Schristos #  define malloc_message jet_malloc_message
22*8e33eff8Schristos #  define malloc_stats_print jet_malloc_stats_print
23*8e33eff8Schristos #  define malloc_usable_size jet_malloc_usable_size
24*8e33eff8Schristos #  define mallocx jet_mallocx
25*8e33eff8Schristos #  define nallocx jet_nallocx
26*8e33eff8Schristos #  define posix_memalign jet_posix_memalign
27*8e33eff8Schristos #  define rallocx jet_rallocx
28*8e33eff8Schristos #  define realloc jet_realloc
29*8e33eff8Schristos #  define sallocx jet_sallocx
30*8e33eff8Schristos #  define sdallocx jet_sdallocx
31*8e33eff8Schristos #  define xallocx jet_xallocx
32*8e33eff8Schristos #  define valloc jet_valloc
33*8e33eff8Schristos #endif
34*8e33eff8Schristos 
35*8e33eff8Schristos /*
36*8e33eff8Schristos  * The jet_* macros can be used as stable alternative names for the
37*8e33eff8Schristos  * public jemalloc API if JEMALLOC_NO_DEMANGLE is defined.  This is primarily
38*8e33eff8Schristos  * meant for use in jemalloc itself, but it can be used by application code to
39*8e33eff8Schristos  * provide isolation from the name mangling specified via --with-mangling
40*8e33eff8Schristos  * and/or --with-jemalloc-prefix.
41*8e33eff8Schristos  */
42*8e33eff8Schristos #ifndef JEMALLOC_NO_DEMANGLE
43*8e33eff8Schristos #  undef jet_aligned_alloc
44*8e33eff8Schristos #  undef jet_calloc
45*8e33eff8Schristos #  undef jet_dallocx
46*8e33eff8Schristos #  undef jet_free
47*8e33eff8Schristos #  undef jet_mallctl
48*8e33eff8Schristos #  undef jet_mallctlbymib
49*8e33eff8Schristos #  undef jet_mallctlnametomib
50*8e33eff8Schristos #  undef jet_malloc
51*8e33eff8Schristos #  undef jet_malloc_conf
52*8e33eff8Schristos #  undef jet_malloc_message
53*8e33eff8Schristos #  undef jet_malloc_stats_print
54*8e33eff8Schristos #  undef jet_malloc_usable_size
55*8e33eff8Schristos #  undef jet_mallocx
56*8e33eff8Schristos #  undef jet_nallocx
57*8e33eff8Schristos #  undef jet_posix_memalign
58*8e33eff8Schristos #  undef jet_rallocx
59*8e33eff8Schristos #  undef jet_realloc
60*8e33eff8Schristos #  undef jet_sallocx
61*8e33eff8Schristos #  undef jet_sdallocx
62*8e33eff8Schristos #  undef jet_xallocx
63*8e33eff8Schristos #  undef jet_valloc
64*8e33eff8Schristos #endif
65