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 nallocx jet_nallocx 26 # define mallctl jet_mallctl 27 # define mallctlnametomib jet_mallctlnametomib 28 # define mallctlbymib jet_mallctlbymib 29 # define malloc_stats_print jet_malloc_stats_print 30 # define malloc_usable_size jet_malloc_usable_size 31 # define memalign jet_memalign 32 # define valloc jet_valloc 33 #endif 34 35 /* 36 * The jet_* macros can be used as stable alternative names for the 37 * public jemalloc API if JEMALLOC_NO_DEMANGLE is defined. This is primarily 38 * meant for use in jemalloc itself, but it can be used by application code to 39 * provide isolation from the name mangling specified via --with-mangling 40 * and/or --with-jemalloc-prefix. 41 */ 42 #ifndef JEMALLOC_NO_DEMANGLE 43 # undef jet_malloc_conf 44 # undef jet_malloc_message 45 # undef jet_malloc 46 # undef jet_calloc 47 # undef jet_posix_memalign 48 # undef jet_aligned_alloc 49 # undef jet_realloc 50 # undef jet_free 51 # undef jet_mallocx 52 # undef jet_rallocx 53 # undef jet_xallocx 54 # undef jet_sallocx 55 # undef jet_dallocx 56 # undef jet_nallocx 57 # undef jet_mallctl 58 # undef jet_mallctlnametomib 59 # undef jet_mallctlbymib 60 # undef jet_malloc_stats_print 61 # undef jet_malloc_usable_size 62 # undef jet_memalign 63 # undef jet_valloc 64 #endif 65