/freebsd/contrib/jemalloc/src/ |
H A D | tcache.c | 41 tcache_event_hard(tsd_t *tsd, tcache_t *tcache) { in tcache_event_hard() argument 42 szind_t binind = tcache->next_gc_bin; in tcache_event_hard() 46 tbin = tcache_small_bin_get(tcache, binind); in tcache_event_hard() 48 tbin = tcache_large_bin_get(tcache, binind); in tcache_event_hard() 55 tcache_bin_flush_small(tsd, tcache, tbin, binind, in tcache_event_hard() 64 (tcache->lg_fill_div[binind] + 1)) >= 1) { in tcache_event_hard() 65 tcache->lg_fill_div[binind]++; in tcache_event_hard() 69 - tbin->low_water + (tbin->low_water >> 2), tcache); in tcache_event_hard() 76 if (binind < SC_NBINS && tcache->lg_fill_div[binind] > 1) { in tcache_event_hard() 77 tcache->lg_fill_div[binind]--; in tcache_event_hard() [all …]
|
H A D | jemalloc.c | 668 tcache_t *tcache; in stats_print_atexit() local 671 ql_foreach(tcache, &arena->tcache_ql, link) { in stats_print_atexit() 672 tcache_stats_merge(tsdn, tcache, arena); in stats_print_atexit() 1918 tcache_t *tcache; in imalloc_no_sample() local 1925 tcache = tsd_tcachep_get(tsd); in imalloc_no_sample() 1926 assert(tcache == tcache_get(tsd)); in imalloc_no_sample() 1928 tcache = tcache_get(tsd); in imalloc_no_sample() 1931 tcache = NULL; in imalloc_no_sample() 1933 tcache = tcaches_get(tsd, dopts->tcache_ind); in imalloc_no_sample() 1950 dopts->zero, tcache, arena); in imalloc_no_sample() [all …]
|
H A D | hook.c | 133 tcache_t *tcache = tsdn_tcachep_get(tsdn); in hook_reentrantp() local 134 if (tcache != NULL) { in hook_reentrantp() 135 return &tcache->in_hook; in hook_reentrantp()
|
H A D | tsd.c | 77 ql_foreach(tsd_list, &tsd_nominal_tsds, TSD_MANGLE(tcache).tsd_link) { in tsd_in_nominal_list() 91 ql_elm_new(tsd, TSD_MANGLE(tcache).tsd_link); in tsd_add_nominal() 93 ql_tail_insert(&tsd_nominal_tsds, tsd, TSD_MANGLE(tcache).tsd_link); in tsd_add_nominal() 102 ql_remove(&tsd_nominal_tsds, tsd, TSD_MANGLE(tcache).tsd_link); in tsd_remove_nominal() 115 ql_foreach(remote_tsd, &tsd_nominal_tsds, TSD_MANGLE(tcache).tsd_link) { in tsd_force_recompute()
|
H A D | arena.c | 1381 arena_tcache_fill_small(tsdn_t *tsdn, arena_t *arena, tcache_t *tcache, in arena_tcache_fill_small() argument 1395 tcache->lg_fill_div[binind]); i < nfill; i += cnt) { in arena_tcache_fill_small() 1533 bool zero, tcache_t *tcache) { in arena_palloc() argument 1541 zero, tcache, true); in arena_palloc() 1597 arena_dalloc_promoted(tsdn_t *tsdn, void *ptr, tcache_t *tcache, in arena_dalloc_promoted() argument 1613 if (bumped_usize <= tcache_maxclass && tcache != NULL) { in arena_dalloc_promoted() 1614 tcache_dalloc_large(tsdn_tsd(tsdn), tcache, ptr, in arena_dalloc_promoted() 1787 size_t alignment, bool zero, tcache_t *tcache) { in arena_ralloc_move_helper() argument 1790 zero, tcache, true); in arena_ralloc_move_helper() 1796 return ipalloct(tsdn, usize, alignment, zero, tcache, arena); in arena_ralloc_move_helper() [all …]
|
H A D | large.c | 275 size_t alignment, bool zero, tcache_t *tcache, in large_ralloc() argument 313 isdalloct(tsdn, extent_addr_get(extent), oldusize, tcache, NULL, true); in large_ralloc()
|
H A D | ctl.c | 630 {NAME("tcache"), CHILD(named, tcache)},
|
/freebsd/contrib/jemalloc/include/jemalloc/internal/ |
H A D | tcache_inlines.h | 31 tcache_event(tsd_t *tsd, tcache_t *tcache) { in tcache_event() argument 36 if (unlikely(ticker_tick(&tcache->gc_ticker))) { in tcache_event() 37 tcache_event_hard(tsd, tcache); in tcache_event() 42 tcache_alloc_small(tsd_t *tsd, arena_t *arena, tcache_t *tcache, in tcache_alloc_small() argument 50 bin = tcache_small_bin_get(tcache, binind); in tcache_alloc_small() 60 ret = tcache_alloc_small_hard(tsd_tsdn(tsd), arena, tcache, in tcache_alloc_small() 97 tcache->prof_accumbytes += usize; in tcache_alloc_small() 99 tcache_event(tsd, tcache); in tcache_alloc_small() 104 tcache_alloc_large(tsd_t *tsd, arena_t *arena, tcache_t *tcache, size_t size, in tcache_alloc_large() argument 111 bin = tcache_large_bin_get(tcache, binind); in tcache_alloc_large() [all …]
|
H A D | jemalloc_internal_inlines_c.h | 42 iallocztm(tsdn_t *tsdn, size_t size, szind_t ind, bool zero, tcache_t *tcache, in iallocztm() argument 46 assert(!is_internal || tcache == NULL); in iallocztm() 53 ret = arena_malloc(tsdn, arena, size, ind, zero, tcache, slow_path); in iallocztm() 68 tcache_t *tcache, bool is_internal, arena_t *arena) { in ipallocztm() argument 73 assert(!is_internal || tcache == NULL); in ipallocztm() 78 ret = arena_palloc(tsdn, arena, usize, alignment, zero, tcache); in ipallocztm() 88 tcache_t *tcache, arena_t *arena) { in ipalloct() argument 89 return ipallocztm(tsdn, usize, alignment, zero, tcache, false, arena); in ipalloct() 104 idalloctm(tsdn_t *tsdn, void *ptr, tcache_t *tcache, alloc_ctx_t *alloc_ctx, in idalloctm() argument 107 assert(!is_internal || tcache == NULL); in idalloctm() [all …]
|
H A D | tcache_externs.h | 29 void tcache_event_hard(tsd_t *tsd, tcache_t *tcache); 30 void *tcache_alloc_small_hard(tsdn_t *tsdn, arena_t *arena, tcache_t *tcache, 32 void tcache_bin_flush_small(tsd_t *tsd, tcache_t *tcache, cache_bin_t *tbin, 35 unsigned rem, tcache_t *tcache); 36 void tcache_arena_reassociate(tsdn_t *tsdn, tcache_t *tcache, 40 void tcache_stats_merge(tsdn_t *tsdn, tcache_t *tcache, arena_t *arena); 45 void tcache_arena_associate(tsdn_t *tsdn, tcache_t *tcache, arena_t *arena);
|
H A D | arena_inlines_b.h | 160 tcache_t *tcache, bool slow_path) { in arena_malloc() argument 161 assert(!tsdn_null(tsdn) || tcache == NULL); in arena_malloc() 163 if (likely(tcache != NULL)) { in arena_malloc() 166 tcache, size, ind, zero, slow_path); in arena_malloc() 170 tcache, size, ind, zero, slow_path); in arena_malloc() 270 arena_dalloc_large(tsdn_t *tsdn, void *ptr, tcache_t *tcache, szind_t szind, in arena_dalloc_large() argument 274 arena_dalloc_promoted(tsdn, ptr, tcache, slow_path); in arena_dalloc_large() 276 tcache_dalloc_large(tsdn_tsd(tsdn), tcache, ptr, szind, in arena_dalloc_large() 286 arena_dalloc(tsdn_t *tsdn, void *ptr, tcache_t *tcache, in arena_dalloc() argument 288 assert(!tsdn_null(tsdn) || tcache == NULL); in arena_dalloc() [all …]
|
H A D | jemalloc_internal_inlines_b.h | 25 tcache_t *tcache = tcache_get(tsd); in arena_choose_impl() local 26 if (tcache->arena != NULL) { in arena_choose_impl() 28 assert(tcache->arena == in arena_choose_impl() 30 if (tcache->arena != ret) { in arena_choose_impl() 32 tcache, ret); in arena_choose_impl() 35 tcache_arena_associate(tsd_tsdn(tsd), tcache, in arena_choose_impl()
|
H A D | jemalloc_internal_inlines_a.h | 112 tcache_small_bin_get(tcache_t *tcache, szind_t binind) { in tcache_small_bin_get() argument 114 return &tcache->bins_small[binind]; in tcache_small_bin_get() 118 tcache_large_bin_get(tcache_t *tcache, szind_t binind) { in tcache_large_bin_get() argument 120 return &tcache->bins_large[binind - SC_NBINS]; in tcache_large_bin_get()
|
H A D | arena_inlines_a.h | 49 tcache_t *tcache = tcache_get(tsd); in percpu_arena_update() local 50 if (tcache != NULL) { in percpu_arena_update() 51 tcache_arena_reassociate(tsd_tsdn(tsd), tcache, in percpu_arena_update()
|
H A D | arena_externs.h | 51 void arena_tcache_fill_small(tsdn_t *tsdn, arena_t *arena, tcache_t *tcache, 62 size_t alignment, bool zero, tcache_t *tcache); 64 void arena_dalloc_promoted(tsdn_t *tsdn, void *ptr, tcache_t *tcache, 72 size_t size, size_t alignment, bool zero, tcache_t *tcache,
|
H A D | tcache_structs.h | 65 tcache_t *tcache; member
|
H A D | large_externs.h | 12 size_t alignment, bool zero, tcache_t *tcache,
|
H A D | tsd.h | 79 O(tcache, tcache_t, tcache_t) \
|
/freebsd/contrib/tcsh/ |
H A D | tc.func.c | 1446 } *tcache = NULL; variable 1536 if (tcache == NULL) in gettilde() 1537 tcache = xmalloc(TILINCR * sizeof(struct tildecache)); in gettilde() 1541 for (bp1 = tcache, bp2 = tcache + tlength; bp1 < bp2;) { in gettilde() 1562 tcache[tlength].user = Strsave(us); in gettilde() 1563 tcache[tlength].home = hd; in gettilde() 1564 tcache[tlength++].hlen = Strlen(hd); in gettilde() 1566 qsort(tcache, tlength, sizeof(struct tildecache), tildecompare); in gettilde() 1570 tcache = xrealloc(tcache, tsize * sizeof(struct tildecache)); in gettilde() 1590 xfree(tcache[i].home); in getusername() [all …]
|
/freebsd/contrib/jemalloc/ |
H A D | ChangeLog | 83 - Avoid taking large_mtx for auto arenas on the tcache flush path. (@interwq) 97 - Refactor and optimize the tcache fill / flush paths. (@djwatson) 119 - Properly trigger decay on tcache destroy. (@interwq, @amosbird) 120 - Fix tcache.flush. (@interwq) 133 - Add size-matching sanity checks on tcache flush. (@davidtgoldblatt, 215 - Refactor arena / tcache interactions. (@davidtgoldblatt) 387 - Embed per thread automatic tcache into thread-specific data, which reduces 388 conditional branches and dereferences. Also reorganize tcache to increase 431 - Remove --disable-tcache. (@jasone) 444 + config.tcache [all …]
|
H A D | FREEBSD-diffs | 384 - tcache_t *tcache; 387 - tcache = tcache_get(tsd); 389 - tcache = NULL; 395 - ifree(tsd, ptr, tcache, true);
|
/freebsd/lib/libc/stdlib/malloc/jemalloc/ |
H A D | Makefile.inc | 6 prng.c prof.c rtree.c safety_check.c sc.c stats.c sz.c tcache.c \
|