MCPcopy Create free account
hub / github.com/F-Stack/f-stack / tcache_flush_cache

Function tcache_flush_cache

app/redis-6.2.6/deps/jemalloc/src/tcache.c:457–483  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

455}
456
457static void
458tcache_flush_cache(tsd_t *tsd, tcache_t *tcache) {
459 assert(tcache->arena != NULL);
460
461 for (unsigned i = 0; i < NBINS; i++) {
462 cache_bin_t *tbin = tcache_small_bin_get(tcache, i);
463 tcache_bin_flush_small(tsd, tcache, tbin, i, 0);
464
465 if (config_stats) {
466 assert(tbin->tstats.nrequests == 0);
467 }
468 }
469 for (unsigned i = NBINS; i < nhbins; i++) {
470 cache_bin_t *tbin = tcache_large_bin_get(tcache, i);
471 tcache_bin_flush_large(tsd, tbin, i, 0, tcache);
472
473 if (config_stats) {
474 assert(tbin->tstats.nrequests == 0);
475 }
476 }
477
478 if (config_prof && tcache->prof_accumbytes > 0 &&
479 arena_prof_accum(tsd_tsdn(tsd), tcache->arena,
480 tcache->prof_accumbytes)) {
481 prof_idump(tsd_tsdn(tsd));
482 }
483}
484
485void
486tcache_flush(tsd_t *tsd) {

Callers 2

tcache_flushFunction · 0.85
tcache_destroyFunction · 0.85

Calls 5

tcache_bin_flush_smallFunction · 0.85
tcache_bin_flush_largeFunction · 0.85
arena_prof_accumFunction · 0.85
tsd_tsdnFunction · 0.85
prof_idumpFunction · 0.85

Tested by

no test coverage detected