1 /* 2 * The jet_ prefix on the following public symbol declarations is an artifact 3 * of namespace management, and should be omitted in application code unless 4 * JEMALLOC_NO_DEMANGLE is defined (see jemalloc_mangle@install_suffix@.h). 5 */ 6 extern JEMALLOC_EXPORT const char *jet_malloc_conf; 7 extern JEMALLOC_EXPORT void (*jet_malloc_message)(void *cbopaque, 8 const char *s); 9 10 JEMALLOC_EXPORT void *jet_malloc(size_t size) JEMALLOC_ATTR(malloc); 11 JEMALLOC_EXPORT void *jet_calloc(size_t num, size_t size) 12 JEMALLOC_ATTR(malloc); 13 JEMALLOC_EXPORT int jet_posix_memalign(void **memptr, size_t alignment, 14 size_t size) JEMALLOC_ATTR(nonnull(1)); 15 JEMALLOC_EXPORT void *jet_aligned_alloc(size_t alignment, size_t size) 16 JEMALLOC_ATTR(malloc); 17 JEMALLOC_EXPORT void *jet_realloc(void *ptr, size_t size); 18 JEMALLOC_EXPORT void jet_free(void *ptr); 19 20 JEMALLOC_EXPORT void *jet_mallocx(size_t size, int flags) 21 JEMALLOC_ATTR(malloc); 22 JEMALLOC_EXPORT void *jet_rallocx(void *ptr, size_t size, int flags); 23 JEMALLOC_EXPORT size_t jet_xallocx(void *ptr, size_t size, size_t extra, 24 int flags); 25 JEMALLOC_EXPORT size_t jet_sallocx(const void *ptr, int flags) 26 JEMALLOC_ATTR(pure); 27 JEMALLOC_EXPORT void jet_dallocx(void *ptr, int flags); 28 JEMALLOC_EXPORT void jet_sdallocx(void *ptr, size_t size, int flags); 29 JEMALLOC_EXPORT size_t jet_nallocx(size_t size, int flags) 30 JEMALLOC_ATTR(pure); 31 32 JEMALLOC_EXPORT int jet_mallctl(const char *name, void *oldp, 33 size_t *oldlenp, void *newp, size_t newlen); 34 JEMALLOC_EXPORT int jet_mallctlnametomib(const char *name, size_t *mibp, 35 size_t *miblenp); 36 JEMALLOC_EXPORT int jet_mallctlbymib(const size_t *mib, size_t miblen, 37 void *oldp, size_t *oldlenp, void *newp, size_t newlen); 38 JEMALLOC_EXPORT void jet_malloc_stats_print(void (*write_cb)(void *, 39 const char *), void *jet_cbopaque, const char *opts); 40 JEMALLOC_EXPORT size_t jet_malloc_usable_size( 41 JEMALLOC_USABLE_SIZE_CONST void *ptr); 42 43 #ifdef JEMALLOC_OVERRIDE_MEMALIGN 44 JEMALLOC_EXPORT void * jet_memalign(size_t alignment, size_t size) 45 JEMALLOC_ATTR(malloc); 46 #endif 47 48 #ifdef JEMALLOC_OVERRIDE_VALLOC 49 JEMALLOC_EXPORT void * jet_valloc(size_t size) JEMALLOC_ATTR(malloc); 50 #endif 51 52 typedef void *(chunk_alloc_t)(size_t, size_t, bool *, unsigned); 53 typedef bool (chunk_dalloc_t)(void *, size_t, unsigned); 54