MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / base_stats_get

Function base_stats_get

deps/jemalloc/src/base.c:480–493  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

478}
479
480void
481base_stats_get(tsdn_t *tsdn, base_t *base, size_t *allocated, size_t *resident,
482 size_t *mapped, size_t *n_thp) {
483 cassert(config_stats);
484
485 malloc_mutex_lock(tsdn, &base->mtx);
486 assert(base->allocated <= base->resident);
487 assert(base->resident <= base->mapped);
488 *allocated = base->allocated;
489 *resident = base->resident;
490 *mapped = base->mapped;
491 *n_thp = base->n_thp;
492 malloc_mutex_unlock(tsdn, &base->mtx);
493}
494
495void
496base_prefork(tsdn_t *tsdn, base_t *base) {

Callers 3

arena_stats_mergeFunction · 0.70
base.cFile · 0.50
TEST_BEGINFunction · 0.50

Calls 2

malloc_mutex_lockFunction · 0.50
malloc_mutex_unlockFunction · 0.50

Tested by 1

TEST_BEGINFunction · 0.40