Add the "stats.allocated" mallctl.

This commit is contained in:
Jason Evans
2015-03-23 17:25:57 -07:00
parent 8ad6bf360f
commit 4acd75a694
8 changed files with 67 additions and 23 deletions

View File

@@ -10,7 +10,7 @@
#ifdef JEMALLOC_H_EXTERNS
void *base_alloc(size_t size);
size_t base_allocated_get(void);
void base_stats_get(size_t *allocated, size_t *resident, size_t *mapped);
bool base_boot(void);
void base_prefork(void);
void base_postfork_parent(void);

View File

@@ -53,6 +53,7 @@ struct ctl_stats_s {
size_t allocated;
size_t active;
size_t metadata;
size_t resident;
size_t mapped;
unsigned narenas;
ctl_arena_stats_t *arenas; /* (narenas + 1) elements. */

View File

@@ -111,11 +111,11 @@ atomic_sub_uint32
atomic_sub_uint64
atomic_sub_z
base_alloc
base_allocated_get
base_boot
base_postfork_child
base_postfork_parent
base_prefork
base_stats_get
bitmap_full
bitmap_get
bitmap_info_init