| 284 | } |
| 285 | |
| 286 | void |
| 287 | tcache_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 | |
| 300 | static void |
| 301 | tcache_arena_dissociate(tsdn_t *tsdn, tcache_t *tcache) { |
no test coverage detected