Home | History | Annotate | Download | only in src

Lines Matching refs:tcache

11 static unsigned		stack_nelms; /* Total stack elms per tcache. */
33 tcache_event_hard(tsd_t *tsd, tcache_t *tcache)
35 szind_t binind = tcache->next_gc_bin;
36 tcache_bin_t *tbin = &tcache->tbins[binind];
44 tcache_bin_flush_small(tsd, tcache, tbin, binind,
49 - tbin->low_water + (tbin->low_water >> 2), tcache);
67 tcache->next_gc_bin++;
68 if (tcache->next_gc_bin == nhbins)
69 tcache->next_gc_bin = 0;
73 tcache_alloc_small_hard(tsd_t *tsd, arena_t *arena, tcache_t *tcache,
79 tcache->prof_accumbytes : 0);
81 tcache->prof_accumbytes = 0;
88 tcache_bin_flush_small(tsd_t *tsd, tcache_t *tcache, tcache_bin_t *tbin,
109 if (arena_prof_accum(arena, tcache->prof_accumbytes))
111 tcache->prof_accumbytes = 0;
170 unsigned rem, tcache_t *tcache)
195 tcache->prof_accumbytes);
196 tcache->prof_accumbytes = 0;
253 tcache_arena_associate(tcache_t *tcache, arena_t *arena)
259 ql_elm_new(tcache, link);
260 ql_tail_insert(&arena->tcache_ql, tcache, link);
266 tcache_arena_reassociate(tcache_t *tcache, arena_t *oldarena, arena_t *newarena)
269 tcache_arena_dissociate(tcache, oldarena);
270 tcache_arena_associate(tcache, newarena);
274 tcache_arena_dissociate(tcache_t *tcache, arena_t *arena)
284 if (iter == tcache) {
291 ql_remove(&arena->tcache_ql, tcache, link);
292 tcache_stats_merge(tcache, arena);
316 tcache_t *tcache;
328 tcache = ipallocztm(tsd, size, CACHELINE, true, false, true,
330 if (tcache == NULL)
333 tcache_arena_associate(tcache, arena);
335 ticker_init(&tcache->gc_ticker, TCACHE_GC_INCR);
339 tcache->tbins[i].lg_fill_div = 1;
346 tcache->tbins[i].avail = (void **)((uintptr_t)tcache +
350 return (tcache);
354 tcache_destroy(tsd_t *tsd, tcache_t *tcache)
360 tcache_arena_dissociate(tcache, arena);
363 tcache_bin_t *tbin = &tcache->tbins[i];
364 tcache_bin_flush_small(tsd, tcache, tbin, i, 0);
375 tcache_bin_t *tbin = &tcache->tbins[i];
376 tcache_bin_flush_large(tsd, tbin, i, 0, tcache);
387 if (config_prof && tcache->prof_accumbytes > 0 &&
388 arena_prof_accum(arena, tcache->prof_accumbytes))
391 idalloctm(tsd, tcache, false, true, true);
397 tcache_t *tcache;
402 if ((tcache = tsd_tcache_get(tsd)) != NULL) {
403 tcache_destroy(tsd, tcache);
417 tcache_stats_merge(tcache_t *tcache, arena_t *arena)
423 /* Merge and reset tcache stats. */
426 tcache_bin_t *tbin = &tcache->tbins[i];
435 tcache_bin_t *tbin = &tcache->tbins[i];
445 tcache_t *tcache;
457 tcache = tcache_create(tsd, arena_get(0, false));
458 if (tcache == NULL)
464 elm->tcache = tcache;
468 elm->tcache = tcache;
480 if (elm->tcache == NULL)
482 tcache_destroy(tsd, elm->tcache);
483 elm->tcache = NULL;