Rizin
unix-like reverse engineering framework and cli tools
jemalloc_mangle_jet.h
Go to the documentation of this file.
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 jet_malloc_conf
13 # define malloc_message jet_malloc_message
14 # define malloc jet_malloc
15 # define calloc jet_calloc
16 # define posix_memalign jet_posix_memalign
17 # define aligned_alloc jet_aligned_alloc
18 # define realloc jet_realloc
19 # define free jet_free
20 # define mallocx jet_mallocx
21 # define rallocx jet_rallocx
22 # define xallocx jet_xallocx
23 # define sallocx jet_sallocx
24 # define dallocx jet_dallocx
25 # define sdallocx jet_sdallocx
26 # define nallocx jet_nallocx
27 # define mallctl jet_mallctl
28 # define mallctlnametomib jet_mallctlnametomib
29 # define mallctlbymib jet_mallctlbymib
30 # define malloc_stats_print jet_malloc_stats_print
31 # define malloc_usable_size jet_malloc_usable_size
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_malloc_conf
45 # undef jet_malloc_message
46 # undef jet_malloc
47 # undef jet_calloc
48 # undef jet_posix_memalign
49 # undef jet_aligned_alloc
50 # undef jet_realloc
51 # undef jet_free
52 # undef jet_mallocx
53 # undef jet_rallocx
54 # undef jet_xallocx
55 # undef jet_sallocx
56 # undef jet_dallocx
57 # undef jet_sdallocx
58 # undef jet_nallocx
59 # undef jet_mallctl
60 # undef jet_mallctlnametomib
61 # undef jet_mallctlbymib
62 # undef jet_malloc_stats_print
63 # undef jet_malloc_usable_size
64 # undef jet_memalign
65 # undef jet_valloc
66 #endif