/freebsd/contrib/jemalloc/src/ |
H A D | tcache.c | 148 tbin_extents_lookup_size_check(tsd_tsdn(tsd), tbin, binind, in tcache_bin_flush_small() 152 item_extent[i] = iealloc(tsd_tsdn(tsd), in tcache_bin_flush_small() 160 arena_t *bin_arena = arena_get(tsd_tsdn(tsd), bin_arena_ind, in tcache_bin_flush_small() 167 if (arena_prof_accum(tsd_tsdn(tsd), arena, in tcache_bin_flush_small() 169 prof_idump(tsd_tsdn(tsd)); in tcache_bin_flush_small() 174 malloc_mutex_lock(tsd_tsdn(tsd), &bin->lock); in tcache_bin_flush_small() 189 arena_dalloc_bin_junked_locked(tsd_tsdn(tsd), in tcache_bin_flush_small() 203 malloc_mutex_unlock(tsd_tsdn(tsd), &bin->lock); in tcache_bin_flush_small() 204 arena_decay_ticks(tsd_tsdn(tsd), bin_arena, nflush - ndeferred); in tcache_bin_flush_small() 213 bin_t *bin = arena_bin_choose_lock(tsd_tsdn(tsd), arena, binind, in tcache_bin_flush_small() [all …]
|
H A D | jemalloc.c | 382 arena_t *arena = arena_get(tsd_tsdn(tsd), ind, false); in arena_bind() 404 oldarena = arena_get(tsd_tsdn(tsd), oldind, false); in arena_migrate() 405 newarena = arena_get(tsd_tsdn(tsd), newind, false); in arena_migrate() 415 arena = arena_get(tsd_tsdn(tsd), ind, false); in arena_unbind() 508 ret = arena_get(tsd_tsdn(tsd), choose, true); in arena_choose_hard() 534 malloc_mutex_lock(tsd_tsdn(tsd), &arenas_lock); in arena_choose_hard() 535 assert(arena_get(tsd_tsdn(tsd), 0, false) != NULL); in arena_choose_hard() 537 if (arena_get(tsd_tsdn(tsd), i, false) != NULL) { in arena_choose_hard() 544 tsd_tsdn(tsd), i, false), !!j) < in arena_choose_hard() 546 tsd_tsdn(tsd), choose[j], false), in arena_choose_hard() [all …]
|
H A D | prof.c | 332 malloc_mutex_lock(tsd_tsdn(tsd), tctx->tdata->lock); in rb_gen() 334 if (prof_tctx_should_destroy(tsd_tsdn(tsd), tctx)) { in rb_gen() 337 malloc_mutex_unlock(tsd_tsdn(tsd), tctx->tdata->lock); in rb_gen() 367 malloc_mutex_assert_owner(tsd_tsdn(tsd), &log_mtx); in prof_log_bt_index() 379 iallocztm(tsd_tsdn(tsd), sz, sz_size2index(sz), false, NULL, in prof_log_bt_index() 409 malloc_mutex_assert_owner(tsd_tsdn(tsd), &log_mtx); in prof_log_thr_index() 420 iallocztm(tsd_tsdn(tsd), sz, sz_size2index(sz), false, NULL, in prof_log_thr_index() 445 malloc_mutex_assert_owner(tsd_tsdn(tsd), tctx->tdata->lock); in prof_try_log() 457 malloc_mutex_lock(tsd_tsdn(tsd), &log_mtx); in prof_try_log() 474 nstime_t alloc_time = prof_alloc_time_get(tsd_tsdn(tsd), ptr, in prof_try_log() [all …]
|
H A D | background_thread.c | 313 malloc_mutex_assert_owner(tsd_tsdn(tsd), 316 malloc_mutex_assert_not_owner(tsd_tsdn(tsd), 321 malloc_mutex_lock(tsd_tsdn(tsd), &info->mtx); 331 malloc_mutex_unlock(tsd_tsdn(tsd), &info->mtx); 391 tsdn_t *tsdn = tsd_tsdn(tsd); 444 if (background_thread_pause_check(tsd_tsdn(tsd), 452 background_work_sleep_once(tsd_tsdn(tsd), 467 malloc_mutex_lock(tsd_tsdn(tsd), &info->mtx); 475 malloc_mutex_unlock(tsd_tsdn(tsd), &info->mtx); 486 malloc_mutex_lock(tsd_tsdn(tsd), &info->mtx); [all …]
|
H A D | ctl.c | 739 (struct container_s *)base_alloc(tsd_tsdn(tsd), in arenas_i_impl() 747 ret = (ctl_arena_t *)base_alloc(tsd_tsdn(tsd), b0get(), in arenas_i_impl() 1022 if (arena_init(tsd_tsdn(tsd), arena_ind, extent_hooks) == NULL) { in ctl_arena_init() 1120 tsdn_t *tsdn = tsd_tsdn(tsd); in ctl_init() 1306 ret = ctl_lookup(tsd_tsdn(tsd), name, nodes, mib, &depth); in ctl_byname() 1332 ret = ctl_lookup(tsd_tsdn(tsd), name, NULL, mibp, miblenp); in ctl_nametomib() 1366 node = inode->index(tsd_tsdn(tsd), mib, miblen, mib[i]); in ctl_bymib() 1484 malloc_mutex_lock(tsd_tsdn(tsd), &ctl_mtx); \ 1493 malloc_mutex_unlock(tsd_tsdn(tsd), &ctl_mtx); \ 1508 malloc_mutex_lock(tsd_tsdn(tsd), &ctl_mtx); \ [all …]
|
H A D | ckh.c | 283 tab = (ckhc_t *)ipallocztm(tsd_tsdn(tsd), usize, CACHELINE, in ckh_grow() 296 idalloctm(tsd_tsdn(tsd), tab, NULL, NULL, true, true); in ckh_grow() 301 idalloctm(tsd_tsdn(tsd), ckh->tab, NULL, NULL, true, true); in ckh_grow() 327 tab = (ckhc_t *)ipallocztm(tsd_tsdn(tsd), usize, CACHELINE, true, NULL, in ckh_shrink() 343 idalloctm(tsd_tsdn(tsd), tab, NULL, NULL, true, true); in ckh_shrink() 351 idalloctm(tsd_tsdn(tsd), ckh->tab, NULL, NULL, true, true); in ckh_shrink() 404 ckh->tab = (ckhc_t *)ipallocztm(tsd_tsdn(tsd), usize, CACHELINE, true, in ckh_new() 432 idalloctm(tsd_tsdn(tsd), ckh->tab, NULL, NULL, true, true); in ckh_delete()
|
H A D | tsd.c | 92 malloc_mutex_lock(tsd_tsdn(tsd), &tsd_nominal_tsds_lock); in tsd_add_nominal() 94 malloc_mutex_unlock(tsd_tsdn(tsd), &tsd_nominal_tsds_lock); in tsd_add_nominal() 101 malloc_mutex_lock(tsd_tsdn(tsd), &tsd_nominal_tsds_lock); in tsd_remove_nominal() 103 malloc_mutex_unlock(tsd_tsdn(tsd), &tsd_nominal_tsds_lock); in tsd_remove_nominal() 518 malloc_mutex_prefork(tsd_tsdn(tsd), &tsd_nominal_tsds_lock); in tsd_prefork() 523 malloc_mutex_postfork_parent(tsd_tsdn(tsd), &tsd_nominal_tsds_lock); in tsd_postfork_parent() 528 malloc_mutex_postfork_child(tsd_tsdn(tsd), &tsd_nominal_tsds_lock); in tsd_postfork_child()
|
H A D | arena.c | 1068 malloc_mutex_lock(tsd_tsdn(tsd), &bin->lock); in arena_bin_reset() 1072 malloc_mutex_unlock(tsd_tsdn(tsd), &bin->lock); in arena_bin_reset() 1073 arena_slab_dalloc(tsd_tsdn(tsd), arena, slab); in arena_bin_reset() 1074 malloc_mutex_lock(tsd_tsdn(tsd), &bin->lock); in arena_bin_reset() 1077 malloc_mutex_unlock(tsd_tsdn(tsd), &bin->lock); in arena_bin_reset() 1078 arena_slab_dalloc(tsd_tsdn(tsd), arena, slab); in arena_bin_reset() 1079 malloc_mutex_lock(tsd_tsdn(tsd), &bin->lock); in arena_bin_reset() 1084 malloc_mutex_unlock(tsd_tsdn(tsd), &bin->lock); in arena_bin_reset() 1085 arena_slab_dalloc(tsd_tsdn(tsd), arena, slab); in arena_bin_reset() 1086 malloc_mutex_lock(tsd_tsdn(tsd), &bin->lock); in arena_bin_reset() [all …]
|
H A D | extent.c | 211 malloc_mutex_lock(tsd_tsdn(tsd), &info->mtx); in extent_hooks_set() 215 malloc_mutex_unlock(tsd_tsdn(tsd), &info->mtx); in extent_hooks_set() 1271 if (arena == arena_get(tsd_tsdn(tsd), 0, false)) { in extent_hook_pre_reentrancy()
|
/freebsd/contrib/jemalloc/include/jemalloc/internal/ |
H A D | jemalloc_internal_inlines_b.h | 17 return arena_get(tsd_tsdn(tsd), 0, true); in arena_choose_impl() 29 arena_get(tsd_tsdn(tsd), 0, false)); in arena_choose_impl() 31 tcache_arena_reassociate(tsd_tsdn(tsd), in arena_choose_impl() 35 tcache_arena_associate(tsd_tsdn(tsd), tcache, in arena_choose_impl() 49 tsd_tsdn(tsd))) { in arena_choose_impl() 55 ret->last_thd = tsd_tsdn(tsd); in arena_choose_impl()
|
H A D | prof_inlines_b.h | 190 assert(usize == isalloc(tsd_tsdn(tsd), ptr)); in prof_realloc() 209 prof_malloc_sample_object(tsd_tsdn(tsd), ptr, usize, tctx); in prof_realloc() 211 prof_tctx_set(tsd_tsdn(tsd), ptr, usize, NULL, in prof_realloc() 220 prof_tctx_reset(tsd_tsdn(tsd), ptr, tctx); in prof_realloc() 222 assert((uintptr_t)prof_tctx_get(tsd_tsdn(tsd), ptr, NULL) == in prof_realloc() 240 prof_tctx_t *tctx = prof_tctx_get(tsd_tsdn(tsd), ptr, alloc_ctx); in prof_free() 243 assert(usize == isalloc(tsd_tsdn(tsd), ptr)); in prof_free()
|
H A D | tcache_inlines.h | 60 ret = tcache_alloc_small_hard(tsd_tsdn(tsd), arena, tcache, in tcache_alloc_small() 74 assert(tcache_salloc(tsd_tsdn(tsd), ret) == usize); in tcache_alloc_small() 124 ret = large_malloc(tsd_tsdn(tsd), arena, sz_s2u(size), zero); in tcache_alloc_large() 169 assert(tcache_salloc(tsd_tsdn(tsd), ptr) in tcache_dalloc_small() 194 assert(tcache_salloc(tsd_tsdn(tsd), ptr) in tcache_dalloc_large() 196 assert(tcache_salloc(tsd_tsdn(tsd), ptr) <= tcache_maxclass); in tcache_dalloc_large()
|
H A D | arena_inlines_a.h | 44 arena_t *newarena = arena_get(tsd_tsdn(tsd), newind, true); in percpu_arena_update() 51 tcache_arena_reassociate(tsd_tsdn(tsd), tcache, in percpu_arena_update()
|
H A D | jemalloc_internal_inlines_c.h | 62 return iallocztm(tsd_tsdn(tsd), size, ind, zero, tcache_get(tsd), false, in ialloc() 94 return ipallocztm(tsd_tsdn(tsd), usize, alignment, zero, in ipalloc() 123 idalloctm(tsd_tsdn(tsd), ptr, tcache_get(tsd), NULL, false, true); in idalloc() 199 return iralloct(tsd_tsdn(tsd), ptr, oldsize, size, alignment, zero, in iralloc()
|
H A D | tsd.h | 225 tsd_tsdn(tsd_t *tsd) { in tsd_tsdn() function 395 return tsd_tsdn(tsd_fetch_impl(false, false)); in tsdn_fetch()
|
H A D | jemalloc_internal_inlines_a.h | 153 assert(arena != arena_get(tsd_tsdn(tsd), 0, false)); in pre_reentrancy()
|
/freebsd/contrib/jemalloc/ |
H A D | FREEBSD-diffs | 508 ctl_postfork_child(tsd_tsdn(tsd));
|