Lines Matching defs:tsd

134 void	tcache_event_hard(tsd_t *tsd, tcache_t *tcache);
137 void tcache_bin_flush_small(tsd_t *tsd, tcache_t *tcache, tcache_bin_t *tbin,
139 void tcache_bin_flush_large(tsd_t *tsd, tcache_bin_t *tbin, szind_t binind,
143 tcache_t *tcache_get_hard(tsd_t *tsd);
145 void tcache_cleanup(tsd_t *tsd);
146 void tcache_enabled_cleanup(tsd_t *tsd);
149 void tcaches_flush(tsd_t *tsd, unsigned ind);
150 void tcaches_destroy(tsd_t *tsd, unsigned ind);
158 void tcache_event(tsd_t *tsd, tcache_t *tcache);
161 tcache_t *tcache_get(tsd_t *tsd, bool create);
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,
172 tcache_t *tcaches_get(tsd_t *tsd, unsigned ind);
179 tsd_t *tsd;
183 tsd = tsd_fetch();
184 tcache_cleanup(tsd);
190 tsd_t *tsd;
195 tsd = tsd_fetch();
196 tcache_enabled = tsd_tcache_enabled_get(tsd);
199 tsd_tcache_enabled_set(tsd, tcache_enabled);
208 tsd_t *tsd;
213 tsd = tsd_fetch();
216 tsd_tcache_enabled_set(tsd, tcache_enabled);
219 tcache_cleanup(tsd);
223 tcache_get(tsd_t *tsd, bool create)
230 tcache = tsd_tcache_get(tsd);
233 if (unlikely(tcache == NULL) && tsd_nominal(tsd)) {
234 tcache = tcache_get_hard(tsd);
235 tsd_tcache_set(tsd, tcache);
242 tcache_event(tsd_t *tsd, tcache_t *tcache)
249 tcache_event_hard(tsd, tcache);
280 tcache_alloc_small(tsd_t *tsd, arena_t *arena, tcache_t *tcache, size_t size,
294 arena = arena_choose(tsd, arena);
298 ret = tcache_alloc_small_hard(tsd_tsdn(tsd), arena, tcache,
311 assert(tcache_salloc(tsd_tsdn(tsd), ret) == usize);
334 tcache_event(tsd, tcache);
339 tcache_alloc_large(tsd_t *tsd, arena_t *arena, tcache_t *tcache, size_t size,
355 arena = arena_choose(tsd, arena);
359 ret = arena_malloc_large(tsd_tsdn(tsd), arena, binind, zero);
397 tcache_event(tsd, tcache);
402 tcache_dalloc_small(tsd_t *tsd, tcache_t *tcache, void *ptr, szind_t binind,
408 assert(tcache_salloc(tsd_tsdn(tsd), ptr) <= SMALL_MAXCLASS);
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,
435 assert(tcache_salloc(tsd_tsdn(tsd), ptr) > SMALL_MAXCLASS);
436 assert(tcache_salloc(tsd_tsdn(tsd), ptr) <= tcache_maxclass);
446 tcache_bin_flush_large(tsd, tbin, binind,
453 tcache_event(tsd, tcache);
457 tcaches_get(tsd_t *tsd, unsigned ind)
461 elm->tcache = tcache_create(tsd_tsdn(tsd), arena_choose(tsd,