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()
74 tcache_bin_t *tbin, szind_t binind, bool *tcache_success) in tcache_alloc_small_hard() argument
78 arena_tcache_fill_small(tsd, arena, tbin, binind, config_prof ? in tcache_alloc_small_hard()
82 ret = tcache_alloc_easy(tbin, tcache_success); in tcache_alloc_small_hard()
88 tcache_bin_flush_small(tsd_t *tsd, tcache_t *tcache, tcache_bin_t *tbin, in tcache_bin_flush_small() argument
97 assert(rem <= tbin->ncached); in tcache_bin_flush_small()
101 for (nflush = tbin->ncached - rem; nflush > 0; nflush = ndeferred) { in tcache_bin_flush_small()
104 *(tbin->avail - 1)); in tcache_bin_flush_small()
119 bin->stats.nrequests += tbin->tstats.nrequests; in tcache_bin_flush_small()
120 tbin->tstats.nrequests = 0; in tcache_bin_flush_small()
124 ptr = *(tbin->avail - 1 - i); in tcache_bin_flush_small()
141 *(tbin->avail - 1 - 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 - rem, 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 - 1)); 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 - 1 - i); in tcache_bin_flush_large()
223 *(tbin->avail - 1 - ndeferred) = ptr; in tcache_bin_flush_large()
238 arena->stats.nrequests_large += tbin->tstats.nrequests; in tcache_bin_flush_large()
240 tbin->tstats.nrequests; in tcache_bin_flush_large()
241 tbin->tstats.nrequests = 0; in tcache_bin_flush_large()
245 memmove(tbin->avail - rem, tbin->avail - tbin->ncached, rem * in tcache_bin_flush_large()
247 tbin->ncached = rem; in tcache_bin_flush_large()
248 if ((int)tbin->ncached < tbin->low_water) in tcache_bin_flush_large()
249 tbin->low_water = tbin->ncached; in tcache_bin_flush_large()
363 tcache_bin_t *tbin = &tcache->tbins[i]; in tcache_destroy() local
364 tcache_bin_flush_small(tsd, tcache, tbin, i, 0); in tcache_destroy()
366 if (config_stats && tbin->tstats.nrequests != 0) { in tcache_destroy()
369 bin->stats.nrequests += tbin->tstats.nrequests; in tcache_destroy()
375 tcache_bin_t *tbin = &tcache->tbins[i]; in tcache_destroy() local
376 tcache_bin_flush_large(tsd, tbin, i, 0, tcache); in tcache_destroy()
378 if (config_stats && tbin->tstats.nrequests != 0) { in tcache_destroy()
380 arena->stats.nrequests_large += tbin->tstats.nrequests; in tcache_destroy()
382 tbin->tstats.nrequests; in tcache_destroy()
426 tcache_bin_t *tbin = &tcache->tbins[i]; in tcache_stats_merge() local
428 bin->stats.nrequests += tbin->tstats.nrequests; in tcache_stats_merge()
430 tbin->tstats.nrequests = 0; in tcache_stats_merge()
435 tcache_bin_t *tbin = &tcache->tbins[i]; in tcache_stats_merge() local
436 arena->stats.nrequests_large += tbin->tstats.nrequests; in tcache_stats_merge()
437 lstats->nrequests += tbin->tstats.nrequests; in tcache_stats_merge()
438 tbin->tstats.nrequests = 0; in tcache_stats_merge()