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 je_aligned_alloc 13 # define calloc je_calloc 14 # define dallocx je_dallocx 15 # define free je_free 16 # define free_sized je_free_sized 17 # define free_aligned_sized je_free_aligned_sized 18 # define mallctl je_mallctl 19 # define mallctlbymib je_mallctlbymib 20 # define mallctlnametomib je_mallctlnametomib 21 # define malloc je_malloc 22 # define malloc_conf je_malloc_conf 23 # define malloc_conf_2_conf_harder je_malloc_conf_2_conf_harder 24 # define malloc_message je_malloc_message 25 # define malloc_stats_print je_malloc_stats_print 26 # define malloc_usable_size je_malloc_usable_size 27 # define mallocx je_mallocx 28 # define smallocx_81034ce1f1373e37dc865038e1bc8eeecf559ce8 je_smallocx_81034ce1f1373e37dc865038e1bc8eeecf559ce8 29 # define nallocx je_nallocx 30 # define posix_memalign je_posix_memalign 31 # define rallocx je_rallocx 32 # define realloc je_realloc 33 # define sallocx je_sallocx 34 # define sdallocx je_sdallocx 35 # define xallocx je_xallocx 36 # define valloc je_valloc 37 #endif 38 39 /* 40 * The je_* macros can be used as stable alternative names for the 41 * public jemalloc API if JEMALLOC_NO_DEMANGLE is defined. This is primarily 42 * meant for use in jemalloc itself, but it can be used by application code to 43 * provide isolation from the name mangling specified via --with-mangling 44 * and/or --with-jemalloc-prefix. 45 */ 46 #ifndef JEMALLOC_NO_DEMANGLE 47 # undef je_aligned_alloc 48 # undef je_calloc 49 # undef je_dallocx 50 # undef je_free 51 # undef je_free_sized 52 # undef je_free_aligned_sized 53 # undef je_mallctl 54 # undef je_mallctlbymib 55 # undef je_mallctlnametomib 56 # undef je_malloc 57 # undef je_malloc_conf 58 # undef je_malloc_conf_2_conf_harder 59 # undef je_malloc_message 60 # undef je_malloc_stats_print 61 # undef je_malloc_usable_size 62 # undef je_mallocx 63 # undef je_smallocx_81034ce1f1373e37dc865038e1bc8eeecf559ce8 64 # undef je_nallocx 65 # undef je_posix_memalign 66 # undef je_rallocx 67 # undef je_realloc 68 # undef je_sallocx 69 # undef je_sdallocx 70 # undef je_xallocx 71 # undef je_valloc 72 #endif 73