Home | History | Annotate | Download | only in src

Lines Matching full:arena

77 tcache_alloc_small_hard(tsdn_t *tsdn, arena_t *arena, tcache_t *tcache,
82 arena_tcache_fill_small(tsdn, arena, tbin, binind, config_prof ?
95 arena_t *arena;
103 arena = arena_choose(tsd, NULL);
104 assert(arena != NULL);
106 /* Lock the arena bin associated with the first object. */
112 if (config_prof && bin_arena == arena) {
113 if (arena_prof_accum(tsd_tsdn(tsd), arena,
120 if (config_stats && bin_arena == arena) {
142 * arena bin than the one that is currently
156 * arena, so the stats didn't get merged. Manually do so now.
158 arena_bin_t *bin = &arena->bins[binind];
177 arena_t *arena;
185 arena = arena_choose(tsd, NULL);
186 assert(arena != NULL);
188 /* Lock the arena associated with the first object. */
197 if ((config_prof || config_stats) && locked_arena == arena) {
199 idump = arena_prof_accum_locked(arena,
205 arena->stats.nrequests_large +=
207 arena->stats.lstats[binind - NBINS].nrequests +=
224 * arena than the one that is currently locked.
241 * arena, so the stats didn't get merged. Manually do so now.
243 malloc_mutex_lock(tsd_tsdn(tsd), &arena->lock);
244 arena->stats.nrequests_large += tbin->tstats.nrequests;
245 arena->stats.lstats[binind - NBINS].nrequests +=
248 malloc_mutex_unlock(tsd_tsdn(tsd), &arena->lock);
259 tcache_arena_associate(tsdn_t *tsdn, tcache_t *tcache, arena_t *arena)
264 malloc_mutex_lock(tsdn, &arena->lock);
266 ql_tail_insert(&arena->tcache_ql, tcache, link);
267 malloc_mutex_unlock(tsdn, &arena->lock);
272 tcache_arena_dissociate(tsdn_t *tsdn, tcache_t *tcache, arena_t *arena)
277 malloc_mutex_lock(tsdn, &arena->lock);
281 ql_foreach(iter, &arena->tcache_ql, link) {
289 ql_remove(&arena->tcache_ql, tcache, link);
290 tcache_stats_merge(tsdn, tcache, arena);
291 malloc_mutex_unlock(tsdn, &arena->lock);
307 arena_t *arena;
314 arena = arena_choose(tsd, NULL);
315 if (unlikely(arena == NULL))
317 return (tcache_create(tsd_tsdn(tsd), arena));
321 tcache_create(tsdn_t *tsdn, arena_t *arena)
340 tcache_arena_associate(tsdn, tcache, arena);
363 arena_t *arena;
366 arena = arena_choose(tsd, NULL);
367 tcache_arena_dissociate(tsd_tsdn(tsd), tcache, arena);
374 arena_bin_t *bin = &arena->bins[i];
386 malloc_mutex_lock(tsd_tsdn(tsd), &arena->lock);
387 arena->stats.nrequests_large += tbin->tstats.nrequests;
388 arena->stats.lstats[i - NBINS].nrequests +=
390 malloc_mutex_unlock(tsd_tsdn(tsd), &arena->lock);
395 arena_prof_accum(tsd_tsdn(tsd), arena, tcache->prof_accumbytes))
423 tcache_stats_merge(tsdn_t *tsdn, tcache_t *tcache, arena_t *arena)
429 malloc_mutex_assert_owner(tsdn, &arena->lock);
433 arena_bin_t *bin = &arena->bins[i];
442 malloc_large_stats_t *lstats = &arena->stats.lstats[i - NBINS];
444 arena->stats.nrequests_large += tbin->tstats.nrequests;
479 arena_t *arena;
488 arena = arena_ichoose(tsd, NULL);
489 if (unlikely(arena == NULL)) {
493 tcache = tcache_create(tsd_tsdn(tsd), arena);