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 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_aligned_alloc 44 # undef jet_calloc 45 # undef jet_dallocx 46 # undef jet_free 47 # undef jet_mallctl 48 # undef jet_mallctlbymib 49 # undef jet_mallctlnametomib 50 # undef jet_malloc 51 # undef jet_malloc_conf 52 # undef jet_malloc_message 53 # undef jet_malloc_stats_print 54 # undef jet_malloc_usable_size 55 # undef jet_mallocx 56 # undef jet_nallocx 57 # undef jet_posix_memalign 58 # undef jet_rallocx 59 # undef jet_realloc 60 # undef jet_sallocx 61 # undef jet_sdallocx 62 # undef jet_xallocx 63 # undef jet_valloc 64 #endif 65