Lines Matching refs:arena

74 tcache_alloc_small_hard(tsd_t *tsd, arena_t *arena, tcache_t *tcache,  in tcache_alloc_small_hard()  argument
79 arena_tcache_fill_small(arena, tbin, binind, config_prof ? in tcache_alloc_small_hard()
92 arena_t *arena; in tcache_bin_flush_small() local
100 arena = arena_choose(tsd, NULL); in tcache_bin_flush_small()
101 assert(arena != NULL); in tcache_bin_flush_small()
109 if (config_prof && bin_arena == arena) { in tcache_bin_flush_small()
110 if (arena_prof_accum(arena, tcache->prof_accumbytes)) in tcache_bin_flush_small()
116 if (config_stats && bin_arena == arena) { in tcache_bin_flush_small()
153 arena_bin_t *bin = &arena->bins[binind]; in tcache_bin_flush_small()
172 arena_t *arena; in tcache_bin_flush_large() local
180 arena = arena_choose(tsd, NULL); in tcache_bin_flush_large()
181 assert(arena != NULL); in tcache_bin_flush_large()
192 if ((config_prof || config_stats) && locked_arena == arena) { in tcache_bin_flush_large()
194 idump = arena_prof_accum_locked(arena, in tcache_bin_flush_large()
200 arena->stats.nrequests_large += in tcache_bin_flush_large()
202 arena->stats.lstats[binind - NBINS].nrequests += in tcache_bin_flush_large()
236 malloc_mutex_lock(&arena->lock); in tcache_bin_flush_large()
237 arena->stats.nrequests_large += tbin->tstats.nrequests; in tcache_bin_flush_large()
238 arena->stats.lstats[binind - NBINS].nrequests += in tcache_bin_flush_large()
241 malloc_mutex_unlock(&arena->lock); in tcache_bin_flush_large()
252 tcache_arena_associate(tcache_t *tcache, arena_t *arena) in tcache_arena_associate() argument
257 malloc_mutex_lock(&arena->lock); in tcache_arena_associate()
259 ql_tail_insert(&arena->tcache_ql, tcache, link); in tcache_arena_associate()
260 malloc_mutex_unlock(&arena->lock); in tcache_arena_associate()
273 tcache_arena_dissociate(tcache_t *tcache, arena_t *arena) in tcache_arena_dissociate() argument
278 malloc_mutex_lock(&arena->lock); in tcache_arena_dissociate()
282 ql_foreach(iter, &arena->tcache_ql, link) { in tcache_arena_dissociate()
290 ql_remove(&arena->tcache_ql, tcache, link); in tcache_arena_dissociate()
291 tcache_stats_merge(tcache, arena); in tcache_arena_dissociate()
292 malloc_mutex_unlock(&arena->lock); in tcache_arena_dissociate()
299 arena_t *arena; in tcache_get_hard() local
306 arena = arena_choose(tsd, NULL); in tcache_get_hard()
307 if (unlikely(arena == NULL)) in tcache_get_hard()
309 return (tcache_create(tsd, arena)); in tcache_get_hard()
313 tcache_create(tsd_t *tsd, arena_t *arena) in tcache_create() argument
331 tcache_arena_associate(tcache, arena); in tcache_create()
347 arena_t *arena; in tcache_destroy() local
350 arena = arena_choose(tsd, NULL); in tcache_destroy()
351 tcache_arena_dissociate(tcache, arena); in tcache_destroy()
358 arena_bin_t *bin = &arena->bins[i]; in tcache_destroy()
370 malloc_mutex_lock(&arena->lock); in tcache_destroy()
371 arena->stats.nrequests_large += tbin->tstats.nrequests; in tcache_destroy()
372 arena->stats.lstats[i - NBINS].nrequests += in tcache_destroy()
374 malloc_mutex_unlock(&arena->lock); in tcache_destroy()
379 arena_prof_accum(arena, tcache->prof_accumbytes)) in tcache_destroy()
408 tcache_stats_merge(tcache_t *tcache, arena_t *arena) in tcache_stats_merge() argument
416 arena_bin_t *bin = &arena->bins[i]; in tcache_stats_merge()
425 malloc_large_stats_t *lstats = &arena->stats.lstats[i - NBINS]; in tcache_stats_merge()
427 arena->stats.nrequests_large += tbin->tstats.nrequests; in tcache_stats_merge()