Lines Matching refs:tbin
36 tcache_bin_t *tbin = &tcache->tbins[binind]; in tcache_event_hard() local
39 if (tbin->low_water > 0) { in tcache_event_hard()
44 tcache_bin_flush_small(tsd, tcache, tbin, binind, in tcache_event_hard()
45 tbin->ncached - tbin->low_water + (tbin->low_water in tcache_event_hard()
48 tcache_bin_flush_large(tsd, tbin, binind, tbin->ncached in tcache_event_hard()
49 - tbin->low_water + (tbin->low_water >> 2), tcache); in tcache_event_hard()
55 if ((tbin_info->ncached_max >> (tbin->lg_fill_div+1)) >= 1) in tcache_event_hard()
56 tbin->lg_fill_div++; in tcache_event_hard()
57 } else if (tbin->low_water < 0) { in tcache_event_hard()
62 if (tbin->lg_fill_div > 1) in tcache_event_hard()
63 tbin->lg_fill_div--; in tcache_event_hard()
65 tbin->low_water = tbin->ncached; in tcache_event_hard()
75 tcache_bin_t *tbin, szind_t binind) in tcache_alloc_small_hard() argument
79 arena_tcache_fill_small(arena, tbin, binind, config_prof ? in tcache_alloc_small_hard()
83 ret = tcache_alloc_easy(tbin); in tcache_alloc_small_hard()
89 tcache_bin_flush_small(tsd_t *tsd, tcache_t *tcache, tcache_bin_t *tbin, in tcache_bin_flush_small() argument
98 assert(rem <= tbin->ncached); in tcache_bin_flush_small()
102 for (nflush = tbin->ncached - rem; nflush > 0; nflush = ndeferred) { in tcache_bin_flush_small()
105 tbin->avail[0]); in tcache_bin_flush_small()
120 bin->stats.nrequests += tbin->tstats.nrequests; in tcache_bin_flush_small()
121 tbin->tstats.nrequests = 0; in tcache_bin_flush_small()
125 ptr = tbin->avail[i]; in tcache_bin_flush_small()
142 tbin->avail[ndeferred] = ptr; in tcache_bin_flush_small()
156 bin->stats.nrequests += tbin->tstats.nrequests; in tcache_bin_flush_small()
157 tbin->tstats.nrequests = 0; in tcache_bin_flush_small()
161 memmove(tbin->avail, &tbin->avail[tbin->ncached - rem], in tcache_bin_flush_small()
163 tbin->ncached = rem; in tcache_bin_flush_small()
164 if ((int)tbin->ncached < tbin->low_water) in tcache_bin_flush_small()
165 tbin->low_water = tbin->ncached; in tcache_bin_flush_small()
169 tcache_bin_flush_large(tsd_t *tsd, tcache_bin_t *tbin, szind_t binind, in tcache_bin_flush_large() argument
178 assert(rem <= tbin->ncached); in tcache_bin_flush_large()
182 for (nflush = tbin->ncached - rem; nflush > 0; nflush = ndeferred) { in tcache_bin_flush_large()
185 tbin->avail[0]); in tcache_bin_flush_large()
201 tbin->tstats.nrequests; in tcache_bin_flush_large()
203 tbin->tstats.nrequests; in tcache_bin_flush_large()
204 tbin->tstats.nrequests = 0; in tcache_bin_flush_large()
209 ptr = tbin->avail[i]; in tcache_bin_flush_large()
223 tbin->avail[ndeferred] = ptr; in tcache_bin_flush_large()
237 arena->stats.nrequests_large += tbin->tstats.nrequests; in tcache_bin_flush_large()
239 tbin->tstats.nrequests; in tcache_bin_flush_large()
240 tbin->tstats.nrequests = 0; in tcache_bin_flush_large()
244 memmove(tbin->avail, &tbin->avail[tbin->ncached - rem], in tcache_bin_flush_large()
246 tbin->ncached = rem; in tcache_bin_flush_large()
247 if ((int)tbin->ncached < tbin->low_water) in tcache_bin_flush_large()
248 tbin->low_water = tbin->ncached; in tcache_bin_flush_large()
354 tcache_bin_t *tbin = &tcache->tbins[i]; in tcache_destroy() local
355 tcache_bin_flush_small(tsd, tcache, tbin, i, 0); in tcache_destroy()
357 if (config_stats && tbin->tstats.nrequests != 0) { in tcache_destroy()
360 bin->stats.nrequests += tbin->tstats.nrequests; in tcache_destroy()
366 tcache_bin_t *tbin = &tcache->tbins[i]; in tcache_destroy() local
367 tcache_bin_flush_large(tsd, tbin, i, 0, tcache); in tcache_destroy()
369 if (config_stats && tbin->tstats.nrequests != 0) { in tcache_destroy()
371 arena->stats.nrequests_large += tbin->tstats.nrequests; in tcache_destroy()
373 tbin->tstats.nrequests; in tcache_destroy()
417 tcache_bin_t *tbin = &tcache->tbins[i]; in tcache_stats_merge() local
419 bin->stats.nrequests += tbin->tstats.nrequests; in tcache_stats_merge()
421 tbin->tstats.nrequests = 0; in tcache_stats_merge()
426 tcache_bin_t *tbin = &tcache->tbins[i]; in tcache_stats_merge() local
427 arena->stats.nrequests_large += tbin->tstats.nrequests; in tcache_stats_merge()
428 lstats->nrequests += tbin->tstats.nrequests; in tcache_stats_merge()
429 tbin->tstats.nrequests = 0; in tcache_stats_merge()