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:
Jason Evans
2010-01-03 12:10:42 -08:00
parent 9ad48230ed
commit 03c2237af3
5 changed files with 479 additions and 386 deletions
+432 -370
View File
File diff suppressed because it is too large Load Diff
+5 -4
View File
@@ -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
};
+1
View File
@@ -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