• Home
  • Raw
  • Download

Lines Matching refs:tcache

37 tcache_event_hard(tsd_t *tsd, tcache_t *tcache)  in tcache_event_hard()  argument
39 szind_t binind = tcache->next_gc_bin; in tcache_event_hard()
40 tcache_bin_t *tbin = &tcache->tbins[binind]; in tcache_event_hard()
48 tcache_bin_flush_small(tsd, tcache, tbin, binind, in tcache_event_hard()
53 - tbin->low_water + (tbin->low_water >> 2), tcache); in tcache_event_hard()
71 tcache->next_gc_bin++; in tcache_event_hard()
72 if (tcache->next_gc_bin == nhbins) in tcache_event_hard()
73 tcache->next_gc_bin = 0; in tcache_event_hard()
77 tcache_alloc_small_hard(tsdn_t *tsdn, arena_t *arena, tcache_t *tcache, in tcache_alloc_small_hard() argument
83 tcache->prof_accumbytes : 0); in tcache_alloc_small_hard()
85 tcache->prof_accumbytes = 0; in tcache_alloc_small_hard()
92 tcache_bin_flush_small(tsd_t *tsd, tcache_t *tcache, tcache_bin_t *tbin, in tcache_bin_flush_small() argument
114 tcache->prof_accumbytes)) in tcache_bin_flush_small()
116 tcache->prof_accumbytes = 0; in tcache_bin_flush_small()
175 unsigned rem, tcache_t *tcache) in tcache_bin_flush_large() argument
200 tcache->prof_accumbytes); in tcache_bin_flush_large()
201 tcache->prof_accumbytes = 0; in tcache_bin_flush_large()
259 tcache_arena_associate(tsdn_t *tsdn, tcache_t *tcache, arena_t *arena) in tcache_arena_associate() argument
265 ql_elm_new(tcache, link); in tcache_arena_associate()
266 ql_tail_insert(&arena->tcache_ql, tcache, link); in tcache_arena_associate()
272 tcache_arena_dissociate(tsdn_t *tsdn, tcache_t *tcache, arena_t *arena) in tcache_arena_dissociate() argument
282 if (iter == tcache) { in tcache_arena_dissociate()
289 ql_remove(&arena->tcache_ql, tcache, link); in tcache_arena_dissociate()
290 tcache_stats_merge(tsdn, tcache, arena); in tcache_arena_dissociate()
296 tcache_arena_reassociate(tsdn_t *tsdn, tcache_t *tcache, arena_t *oldarena, in tcache_arena_reassociate() argument
300 tcache_arena_dissociate(tsdn, tcache, oldarena); in tcache_arena_reassociate()
301 tcache_arena_associate(tsdn, tcache, newarena); in tcache_arena_reassociate()
323 tcache_t *tcache; in tcache_create() local
335 tcache = ipallocztm(tsdn, size, CACHELINE, true, NULL, true, in tcache_create()
337 if (tcache == NULL) in tcache_create()
340 tcache_arena_associate(tsdn, tcache, arena); in tcache_create()
342 ticker_init(&tcache->gc_ticker, TCACHE_GC_INCR); in tcache_create()
346 tcache->tbins[i].lg_fill_div = 1; in tcache_create()
353 tcache->tbins[i].avail = (void **)((uintptr_t)tcache + in tcache_create()
357 return (tcache); in tcache_create()
361 tcache_destroy(tsd_t *tsd, tcache_t *tcache) in tcache_destroy() argument
367 tcache_arena_dissociate(tsd_tsdn(tsd), tcache, arena); in tcache_destroy()
370 tcache_bin_t *tbin = &tcache->tbins[i]; in tcache_destroy()
371 tcache_bin_flush_small(tsd, tcache, tbin, i, 0); in tcache_destroy()
382 tcache_bin_t *tbin = &tcache->tbins[i]; in tcache_destroy()
383 tcache_bin_flush_large(tsd, tbin, i, 0, tcache); in tcache_destroy()
394 if (config_prof && tcache->prof_accumbytes > 0 && in tcache_destroy()
395 arena_prof_accum(tsd_tsdn(tsd), arena, tcache->prof_accumbytes)) in tcache_destroy()
398 idalloctm(tsd_tsdn(tsd), tcache, NULL, true, true); in tcache_destroy()
404 tcache_t *tcache; in tcache_cleanup() local
409 if ((tcache = tsd_tcache_get(tsd)) != NULL) { in tcache_cleanup()
410 tcache_destroy(tsd, tcache); in tcache_cleanup()
423 tcache_stats_merge(tsdn_t *tsdn, tcache_t *tcache, arena_t *arena) in tcache_stats_merge() argument
434 tcache_bin_t *tbin = &tcache->tbins[i]; in tcache_stats_merge()
443 tcache_bin_t *tbin = &tcache->tbins[i]; in tcache_stats_merge()
480 tcache_t *tcache; in tcaches_create() local
493 tcache = tcache_create(tsd_tsdn(tsd), arena); in tcaches_create()
494 if (tcache == NULL) { in tcaches_create()
503 elm->tcache = tcache; in tcaches_create()
507 elm->tcache = tcache; in tcaches_create()
523 if (elm->tcache == NULL) { in tcaches_elm_flush()
526 tcache_destroy(tsd, elm->tcache); in tcaches_elm_flush()
527 elm->tcache = NULL; in tcaches_elm_flush()