Lines Matching refs:tbin
148 tcache_bin_t *tbin, szind_t binind, bool *tcache_success);
149 void tcache_bin_flush_small(tsd_t *tsd, tcache_t *tcache, tcache_bin_t *tbin,
151 void tcache_bin_flush_large(tsd_t *tsd, tcache_bin_t *tbin, szind_t binind,
177 void *tcache_alloc_easy(tcache_bin_t *tbin, bool *tcache_success);
267 tcache_alloc_easy(tcache_bin_t *tbin, bool *tcache_success) in tcache_alloc_easy() argument
271 if (unlikely(tbin->ncached == 0)) { in tcache_alloc_easy()
272 tbin->low_water = -1; in tcache_alloc_easy()
284 ret = *(tbin->avail - tbin->ncached); in tcache_alloc_easy()
285 tbin->ncached--; in tcache_alloc_easy()
287 if (unlikely((int)tbin->ncached < tbin->low_water)) in tcache_alloc_easy()
288 tbin->low_water = tbin->ncached; in tcache_alloc_easy()
298 tcache_bin_t *tbin; in tcache_alloc_small() local
303 tbin = &tcache->tbins[binind]; in tcache_alloc_small()
304 ret = tcache_alloc_easy(tbin, &tcache_success); in tcache_alloc_small()
312 ret = tcache_alloc_small_hard(tsd, arena, tcache, tbin, binind, in tcache_alloc_small()
345 tbin->tstats.nrequests++; in tcache_alloc_small()
357 tcache_bin_t *tbin; in tcache_alloc_large() local
361 tbin = &tcache->tbins[binind]; in tcache_alloc_large()
362 ret = tcache_alloc_easy(tbin, &tcache_success); in tcache_alloc_large()
405 tbin->tstats.nrequests++; in tcache_alloc_large()
418 tcache_bin_t *tbin; in tcache_dalloc_small() local
426 tbin = &tcache->tbins[binind]; in tcache_dalloc_small()
428 if (unlikely(tbin->ncached == tbin_info->ncached_max)) { in tcache_dalloc_small()
429 tcache_bin_flush_small(tsd, tcache, tbin, binind, in tcache_dalloc_small()
432 assert(tbin->ncached < tbin_info->ncached_max); in tcache_dalloc_small()
433 tbin->ncached++; in tcache_dalloc_small()
434 *(tbin->avail - tbin->ncached) = ptr; in tcache_dalloc_small()
444 tcache_bin_t *tbin; in tcache_dalloc_large() local
456 tbin = &tcache->tbins[binind]; in tcache_dalloc_large()
458 if (unlikely(tbin->ncached == tbin_info->ncached_max)) { in tcache_dalloc_large()
459 tcache_bin_flush_large(tsd, tbin, binind, in tcache_dalloc_large()
462 assert(tbin->ncached < tbin_info->ncached_max); in tcache_dalloc_large()
463 tbin->ncached++; in tcache_dalloc_large()
464 *(tbin->avail - tbin->ncached) = ptr; in tcache_dalloc_large()