Lines Matching refs:tbin
44 cache_bin_t *tbin; in tcache_event_hard() local
46 tbin = tcache_small_bin_get(tcache, binind); in tcache_event_hard()
48 tbin = tcache_large_bin_get(tcache, binind); in tcache_event_hard()
50 if (tbin->low_water > 0) { in tcache_event_hard()
55 tcache_bin_flush_small(tsd, tcache, tbin, binind, in tcache_event_hard()
56 tbin->ncached - tbin->low_water + (tbin->low_water in tcache_event_hard()
68 tcache_bin_flush_large(tsd, tbin, binind, tbin->ncached in tcache_event_hard()
69 - tbin->low_water + (tbin->low_water >> 2), tcache); in tcache_event_hard()
71 } else if (tbin->low_water < 0) { in tcache_event_hard()
80 tbin->low_water = tbin->ncached; in tcache_event_hard()
90 cache_bin_t *tbin, szind_t binind, bool *tcache_success) { in tcache_alloc_small_hard() argument
94 arena_tcache_fill_small(tsdn, arena, tcache, tbin, binind, in tcache_alloc_small_hard()
99 ret = cache_bin_alloc_easy(tbin, tcache_success); in tcache_alloc_small_hard()
106 tbin_extents_lookup_size_check(tsdn_t *tsdn, cache_bin_t *tbin, szind_t binind, in tbin_extents_lookup_size_check() argument
121 rtree_ctx, (uintptr_t)*(tbin->avail - 1 - i), true, in tbin_extents_lookup_size_check()
134 tcache_bin_flush_small(tsd_t *tsd, tcache_t *tcache, cache_bin_t *tbin, in tcache_bin_flush_small() argument
139 assert((cache_bin_sz_t)rem <= tbin->ncached); in tcache_bin_flush_small()
143 unsigned nflush = tbin->ncached - rem; in tcache_bin_flush_small()
148 tbin_extents_lookup_size_check(tsd_tsdn(tsd), tbin, binind, in tcache_bin_flush_small()
153 *(tbin->avail - 1 - i)); in tcache_bin_flush_small()
178 bin->stats.nrequests += tbin->tstats.nrequests; in tcache_bin_flush_small()
179 tbin->tstats.nrequests = 0; in tcache_bin_flush_small()
183 void *ptr = *(tbin->avail - 1 - i); in tcache_bin_flush_small()
198 *(tbin->avail - 1 - ndeferred) = ptr; in tcache_bin_flush_small()
216 bin->stats.nrequests += tbin->tstats.nrequests; in tcache_bin_flush_small()
217 tbin->tstats.nrequests = 0; in tcache_bin_flush_small()
221 memmove(tbin->avail - rem, tbin->avail - tbin->ncached, rem * in tcache_bin_flush_small()
223 tbin->ncached = rem; in tcache_bin_flush_small()
224 if (tbin->ncached < tbin->low_water) { in tcache_bin_flush_small()
225 tbin->low_water = tbin->ncached; in tcache_bin_flush_small()
230 tcache_bin_flush_large(tsd_t *tsd, cache_bin_t *tbin, szind_t binind, in tcache_bin_flush_large() argument
235 assert((cache_bin_sz_t)rem <= tbin->ncached); in tcache_bin_flush_large()
239 unsigned nflush = tbin->ncached - rem; in tcache_bin_flush_large()
245 item_extent[i] = iealloc(tsd_tsdn(tsd), *(tbin->avail - 1 - i)); in tcache_bin_flush_large()
248 tbin_extents_lookup_size_check(tsd_tsdn(tsd), tbin, binind, nflush, in tcache_bin_flush_large()
268 void *ptr = *(tbin->avail - 1 - i); in tcache_bin_flush_large()
287 tbin->tstats.nrequests); in tcache_bin_flush_large()
288 tbin->tstats.nrequests = 0; in tcache_bin_flush_large()
297 void *ptr = *(tbin->avail - 1 - i); in tcache_bin_flush_large()
310 *(tbin->avail - 1 - ndeferred) = ptr; in tcache_bin_flush_large()
328 &tcache_arena->stats, binind, tbin->tstats.nrequests); in tcache_bin_flush_large()
329 tbin->tstats.nrequests = 0; in tcache_bin_flush_large()
332 memmove(tbin->avail - rem, tbin->avail - tbin->ncached, rem * in tcache_bin_flush_large()
334 tbin->ncached = rem; in tcache_bin_flush_large()
335 if (tbin->ncached < tbin->low_water) { in tcache_bin_flush_large()
336 tbin->low_water = tbin->ncached; in tcache_bin_flush_large()
516 cache_bin_t *tbin = tcache_small_bin_get(tcache, i); in tcache_flush_cache() local
517 tcache_bin_flush_small(tsd, tcache, tbin, i, 0); in tcache_flush_cache()
520 assert(tbin->tstats.nrequests == 0); in tcache_flush_cache()
524 cache_bin_t *tbin = tcache_large_bin_get(tcache, i); in tcache_flush_cache() local
525 tcache_bin_flush_large(tsd, tbin, i, 0, tcache); in tcache_flush_cache()
528 assert(tbin->tstats.nrequests == 0); in tcache_flush_cache()
608 cache_bin_t *tbin = tcache_small_bin_get(tcache, i); in tcache_stats_merge() local
611 bin->stats.nrequests += tbin->tstats.nrequests; in tcache_stats_merge()
613 tbin->tstats.nrequests = 0; in tcache_stats_merge()
617 cache_bin_t *tbin = tcache_large_bin_get(tcache, i); in tcache_stats_merge() local
619 tbin->tstats.nrequests); in tcache_stats_merge()
620 tbin->tstats.nrequests = 0; in tcache_stats_merge()