Lines Matching defs:tcache

10  * tcache pointers close to NULL are used to encode state information that is
46 /* Number of tcache allocation/deallocation events between incremental GCs. */
91 * array. During tcache initialization, the avail pointer in each
97 /* Linkage for list of available (previously used) explicit tcache IDs. */
100 tcache_t *tcache;
115 * Number of tcache bins. There are NBINS small-object bins, plus 0 or more
124 * Explicit tcaches, managed via the tcache.{create,flush,destroy} mallctls and
129 * explicit tcache is created without a disproportionate impact on memory usage.
134 void tcache_event_hard(tsd_t *tsd, tcache_t *tcache);
135 void *tcache_alloc_small_hard(tsdn_t *tsdn, arena_t *arena, tcache_t *tcache,
137 void tcache_bin_flush_small(tsd_t *tsd, tcache_t *tcache, tcache_bin_t *tbin,
140 unsigned rem, tcache_t *tcache);
141 void tcache_arena_reassociate(tsdn_t *tsdn, tcache_t *tcache,
147 void tcache_stats_merge(tsdn_t *tsdn, tcache_t *tcache, arena_t *arena);
158 void tcache_event(tsd_t *tsd, tcache_t *tcache);
164 void *tcache_alloc_small(tsd_t *tsd, arena_t *arena, tcache_t *tcache,
166 void *tcache_alloc_large(tsd_t *tsd, arena_t *arena, tcache_t *tcache,
168 void tcache_dalloc_small(tsd_t *tsd, tcache_t *tcache, void *ptr,
170 void tcache_dalloc_large(tsd_t *tsd, tcache_t *tcache, void *ptr,
225 tcache_t *tcache;
230 tcache = tsd_tcache_get(tsd);
232 return (tcache);
233 if (unlikely(tcache == NULL) && tsd_nominal(tsd)) {
234 tcache = tcache_get_hard(tsd);
235 tsd_tcache_set(tsd, tcache);
238 return (tcache);
242 tcache_event(tsd_t *tsd, tcache_t *tcache)
248 if (unlikely(ticker_tick(&tcache->gc_ticker)))
249 tcache_event_hard(tsd, tcache);
280 tcache_alloc_small(tsd_t *tsd, arena_t *arena, tcache_t *tcache, size_t size,
289 tbin = &tcache->tbins[binind];
298 ret = tcache_alloc_small_hard(tsd_tsdn(tsd), arena, tcache,
333 tcache->prof_accumbytes += usize;
334 tcache_event(tsd, tcache);
339 tcache_alloc_large(tsd_t *tsd, arena_t *arena, tcache_t *tcache, size_t size,
347 tbin = &tcache->tbins[binind];
394 tcache->prof_accumbytes += usize;
397 tcache_event(tsd, tcache);
402 tcache_dalloc_small(tsd_t *tsd, tcache_t *tcache, void *ptr, szind_t binind,
413 tbin = &tcache->tbins[binind];
416 tcache_bin_flush_small(tsd, tcache, tbin, binind,
423 tcache_event(tsd, tcache);
427 tcache_dalloc_large(tsd_t *tsd, tcache_t *tcache, void *ptr, size_t size,
443 tbin = &tcache->tbins[binind];
447 (tbin_info->ncached_max >> 1), tcache);
453 tcache_event(tsd, tcache);
460 if (unlikely(elm->tcache == NULL)) {
461 elm->tcache = tcache_create(tsd_tsdn(tsd), arena_choose(tsd,
464 return (elm->tcache);