Make malloc_stats_print() a public symbol, and make it repeatedly callable.
Incrementally merge tcache stats, so that malloc_stats_print() always reports at least most events that have occurred thus far.
This commit is contained in:
+432
-370
File diff suppressed because it is too large
Load Diff
@@ -6,6 +6,10 @@ extern "C" {
|
||||
|
||||
#include "jemalloc_defs.h"
|
||||
|
||||
extern const char *malloc_options;
|
||||
extern void (*malloc_message)(const char *p1,
|
||||
const char *p2, const char *p3, const char *p4);
|
||||
|
||||
void *malloc(size_t size) JEMALLOC_ATTR(malloc);
|
||||
void *calloc(size_t num, size_t size) JEMALLOC_ATTR(malloc);
|
||||
int posix_memalign(void **memptr, size_t alignment, size_t size)
|
||||
@@ -17,10 +21,7 @@ size_t malloc_usable_size(const void *ptr);
|
||||
#ifdef JEMALLOC_TCACHE
|
||||
void malloc_tcache_flush(void);
|
||||
#endif
|
||||
|
||||
extern const char *malloc_options;
|
||||
extern void (*malloc_message)(const char *p1,
|
||||
const char *p2, const char *p3, const char *p4);
|
||||
void malloc_stats_print(const char *opts);
|
||||
|
||||
#ifdef __cplusplus
|
||||
};
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
#undef free
|
||||
#undef malloc_usable_size
|
||||
#undef malloc_tcache_flush
|
||||
#undef malloc_stats_print
|
||||
#undef malloc_options
|
||||
#undef malloc_message
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user