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

Function tcache_arena_associate

deps/memkind/src/jemalloc/src/tcache.c:286–298  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

284}
285
286void
287tcache_arena_associate(tsdn_t *tsdn, tcache_t *tcache, arena_t *arena) {
288 assert(tcache->arena == NULL);
289 tcache->arena = arena;
290
291 if (config_stats) {
292 /* Link into list of extant tcaches. */
293 malloc_mutex_lock(tsdn, &arena->tcache_ql_mtx);
294 ql_elm_new(tcache, link);
295 ql_tail_insert(&arena->tcache_ql, tcache, link);
296 malloc_mutex_unlock(tsdn, &arena->tcache_ql_mtx);
297 }
298}
299
300static void
301tcache_arena_dissociate(tsdn_t *tsdn, tcache_t *tcache) {

Callers 4

tcache_arena_reassociateFunction · 0.70
tsd_tcache_data_initFunction · 0.70
tcache_create_explicitFunction · 0.70
arena_choose_implFunction · 0.50

Calls 2

malloc_mutex_lockFunction · 0.50
malloc_mutex_unlockFunction · 0.50

Tested by

no test coverage detected