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

Function tcaches_flush

deps/jemalloc/src/tcache.c:708–717  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

706}
707
708void
709tcaches_flush(tsd_t *tsd, unsigned ind) {
710 malloc_mutex_lock(tsd_tsdn(tsd), &tcaches_mtx);
711 tcache_t *tcache = tcaches_elm_remove(tsd, &tcaches[ind], true);
712 malloc_mutex_unlock(tsd_tsdn(tsd), &tcaches_mtx);
713 if (tcache != NULL) {
714 /* Destroy the tcache; recreate in tcaches_get() if needed. */
715 tcache_destroy(tsd, tcache, false);
716 }
717}
718
719void
720tcaches_destroy(tsd_t *tsd, unsigned ind) {

Callers 1

tcache_flush_ctlFunction · 0.70

Calls 5

tcaches_elm_removeFunction · 0.70
tcache_destroyFunction · 0.70
malloc_mutex_lockFunction · 0.50
tsd_tsdnFunction · 0.50
malloc_mutex_unlockFunction · 0.50

Tested by

no test coverage detected