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 je_aligned_alloc 13*8e33eff8Schristos # define calloc je_calloc 14*8e33eff8Schristos # define dallocx je_dallocx 15*8e33eff8Schristos # define free je_free 16*8e33eff8Schristos # define mallctl je_mallctl 17*8e33eff8Schristos # define mallctlbymib je_mallctlbymib 18*8e33eff8Schristos # define mallctlnametomib je_mallctlnametomib 19*8e33eff8Schristos # define malloc je_malloc 20*8e33eff8Schristos # define malloc_conf je_malloc_conf 21*8e33eff8Schristos # define malloc_message je_malloc_message 22*8e33eff8Schristos # define malloc_stats_print je_malloc_stats_print 23*8e33eff8Schristos # define malloc_usable_size je_malloc_usable_size 24*8e33eff8Schristos # define mallocx je_mallocx 25*8e33eff8Schristos # define nallocx je_nallocx 26*8e33eff8Schristos # define posix_memalign je_posix_memalign 27*8e33eff8Schristos # define rallocx je_rallocx 28*8e33eff8Schristos # define realloc je_realloc 29*8e33eff8Schristos # define sallocx je_sallocx 30*8e33eff8Schristos # define sdallocx je_sdallocx 31*8e33eff8Schristos # define xallocx je_xallocx 32*8e33eff8Schristos # define valloc je_valloc 33*8e33eff8Schristos #endif 34*8e33eff8Schristos 35*8e33eff8Schristos /* 36*8e33eff8Schristos * The je_* 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 je_aligned_alloc 44*8e33eff8Schristos # undef je_calloc 45*8e33eff8Schristos # undef je_dallocx 46*8e33eff8Schristos # undef je_free 47*8e33eff8Schristos # undef je_mallctl 48*8e33eff8Schristos # undef je_mallctlbymib 49*8e33eff8Schristos # undef je_mallctlnametomib 50*8e33eff8Schristos # undef je_malloc 51*8e33eff8Schristos # undef je_malloc_conf 52*8e33eff8Schristos # undef je_malloc_message 53*8e33eff8Schristos # undef je_malloc_stats_print 54*8e33eff8Schristos # undef je_malloc_usable_size 55*8e33eff8Schristos # undef je_mallocx 56*8e33eff8Schristos # undef je_nallocx 57*8e33eff8Schristos # undef je_posix_memalign 58*8e33eff8Schristos # undef je_rallocx 59*8e33eff8Schristos # undef je_realloc 60*8e33eff8Schristos # undef je_sallocx 61*8e33eff8Schristos # undef je_sdallocx 62*8e33eff8Schristos # undef je_xallocx 63*8e33eff8Schristos # undef je_valloc 64*8e33eff8Schristos #endif 65