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

Function arena_large_malloc_stats_update

deps/jemalloc/src/arena.c:383–397  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

381}
382
383static void
384arena_large_malloc_stats_update(tsdn_t *tsdn, arena_t *arena, size_t usize) {
385 szind_t index, hindex;
386
387 cassert(config_stats);
388
389 if (usize < SC_LARGE_MINCLASS) {
390 usize = SC_LARGE_MINCLASS;
391 }
392 index = sz_size2index(usize);
393 hindex = (index >= SC_NBINS) ? index - SC_NBINS : 0;
394
395 arena_stats_add_u64(tsdn, &arena->stats,
396 &arena->stats.lstats[hindex].nmalloc, 1);
397}
398
399static void
400arena_large_dalloc_stats_update(tsdn_t *tsdn, arena_t *arena, size_t usize) {

Callers 2

arena_extent_alloc_largeFunction · 0.70

Calls 2

sz_size2indexFunction · 0.50
arena_stats_add_u64Function · 0.50

Tested by

no test coverage detected