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

Function tcaches_destroy

deps/jemalloc/src/tcache.c:719–730  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

717}
718
719void
720tcaches_destroy(tsd_t *tsd, unsigned ind) {
721 malloc_mutex_lock(tsd_tsdn(tsd), &tcaches_mtx);
722 tcaches_t *elm = &tcaches[ind];
723 tcache_t *tcache = tcaches_elm_remove(tsd, elm, false);
724 elm->next = tcaches_avail;
725 tcaches_avail = elm;
726 malloc_mutex_unlock(tsd_tsdn(tsd), &tcaches_mtx);
727 if (tcache != NULL) {
728 tcache_destroy(tsd, tcache, false);
729 }
730}
731
732bool
733tcache_boot(tsdn_t *tsdn) {

Callers 1

tcache_destroy_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