Lines Matching refs:tsdn

59 void background_thread_interval_check(tsdn_t *tsdn, arena_t *arena,  in background_thread_create()
61 void background_thread_prefork0(tsdn_t *tsdn) NOT_REACHED in background_thread_create()
62 void background_thread_prefork1(tsdn_t *tsdn) NOT_REACHED in background_thread_create()
63 void background_thread_postfork_parent(tsdn_t *tsdn) NOT_REACHED in background_thread_create()
64 void background_thread_postfork_child(tsdn_t *tsdn) NOT_REACHED in background_thread_create()
65 bool background_thread_stats_read(tsdn_t *tsdn, in background_thread_create()
67 void background_thread_ctl_init(tsdn_t *tsdn) NOT_REACHED in background_thread_create()
74 background_thread_info_init(tsdn_t *tsdn, background_thread_info_t *info) {
75 background_thread_wakeup_time_set(tsdn, info, 0);
118 arena_decay_compute_purge_interval_impl(tsdn_t *tsdn, arena_decay_t *decay,
120 if (malloc_mutex_trylock(tsdn, &decay->mtx)) {
197 malloc_mutex_unlock(tsdn, &decay->mtx);
204 arena_decay_compute_purge_interval(tsdn_t *tsdn, arena_t *arena) {
206 i1 = arena_decay_compute_purge_interval_impl(tsdn, &arena->decay_dirty,
211 i2 = arena_decay_compute_purge_interval_impl(tsdn, &arena->decay_muzzy,
218 background_thread_sleep(tsdn_t *tsdn, background_thread_info_t *info,
246 background_thread_wakeup_time_set(tsdn, info,
259 background_thread_wakeup_time_set(tsdn, info,
274 background_thread_pause_check(tsdn_t *tsdn, background_thread_info_t *info) {
276 malloc_mutex_unlock(tsdn, &info->mtx);
278 malloc_mutex_lock(tsdn, &background_thread_lock);
279 malloc_mutex_unlock(tsdn, &background_thread_lock);
280 malloc_mutex_lock(tsdn, &info->mtx);
288 background_work_sleep_once(tsdn_t *tsdn, background_thread_info_t *info, unsigned ind) {
293 arena_t *arena = arena_get(tsdn, i, false);
297 arena_decay(tsdn, arena, true, false);
302 uint64_t interval = arena_decay_compute_purge_interval(tsdn,
309 background_thread_sleep(tsdn, info, min_interval);
393 tsdn_t *tsdn = tsd_tsdn(tsd);
394 malloc_mutex_unlock(tsdn, &background_thread_info[0].mtx);
400 malloc_mutex_lock(tsdn, &info->mtx);
406 malloc_mutex_unlock(tsdn, &info->mtx);
430 malloc_mutex_lock(tsdn, &background_thread_info[0].mtx);
645 background_thread_interval_check(tsdn_t *tsdn, arena_t *arena,
649 if (malloc_mutex_trylock(tsdn, &info->mtx)) {
662 if (malloc_mutex_trylock(tsdn, &decay->mtx)) {
722 malloc_mutex_unlock(tsdn, &decay->mtx);
724 malloc_mutex_unlock(tsdn, &info->mtx);
728 background_thread_prefork0(tsdn_t *tsdn) {
729 malloc_mutex_prefork(tsdn, &background_thread_lock);
734 background_thread_prefork1(tsdn_t *tsdn) {
736 malloc_mutex_prefork(tsdn, &background_thread_info[i].mtx);
741 background_thread_postfork_parent(tsdn_t *tsdn) {
743 malloc_mutex_postfork_parent(tsdn,
746 malloc_mutex_postfork_parent(tsdn, &background_thread_lock);
750 background_thread_postfork_child(tsdn_t *tsdn) {
752 malloc_mutex_postfork_child(tsdn,
755 malloc_mutex_postfork_child(tsdn, &background_thread_lock);
761 malloc_mutex_lock(tsdn, &background_thread_lock);
763 background_thread_enabled_set(tsdn, false);
766 malloc_mutex_lock(tsdn, &info->mtx);
770 background_thread_info_init(tsdn, info);
771 malloc_mutex_unlock(tsdn, &info->mtx);
773 malloc_mutex_unlock(tsdn, &background_thread_lock);
777 background_thread_stats_read(tsdn_t *tsdn, background_thread_stats_t *stats) {
779 malloc_mutex_lock(tsdn, &background_thread_lock);
781 malloc_mutex_unlock(tsdn, &background_thread_lock);
790 malloc_mutex_lock(tsdn, &info->mtx);
795 malloc_mutex_unlock(tsdn, &info->mtx);
801 malloc_mutex_unlock(tsdn, &background_thread_lock);
837 background_thread_ctl_init(tsdn_t *tsdn) {
838 malloc_mutex_assert_not_owner(tsdn, &background_thread_lock);
864 background_thread_boot1(tsdn_t *tsdn) { in background_thread_boot1() argument
875 background_thread_enabled_set(tsdn, opt_background_thread); in background_thread_boot1()
883 background_thread_info = (background_thread_info_t *)base_alloc(tsdn, in background_thread_boot1()
901 malloc_mutex_lock(tsdn, &info->mtx); in background_thread_boot1()
903 background_thread_info_init(tsdn, info); in background_thread_boot1()
904 malloc_mutex_unlock(tsdn, &info->mtx); in background_thread_boot1()