enable eager delay even on overcommit systems

This commit is contained in:
daan 2022-02-04 16:12:22 -08:00
parent 08e9d4b6c1
commit f2bfaa74fe

View File

@ -580,8 +580,8 @@ static mi_segment_t* mi_segment_init(mi_segment_t* segment, size_t required, mi_
// Initialize parameters
const bool eager_delayed = (page_kind <= MI_PAGE_MEDIUM && // don't delay for large objects
!_mi_os_has_overcommit() && // never delay on overcommit systems
_mi_current_thread_count() > 2 && // do not delay for the first N threads
// !_mi_os_has_overcommit() && // never delay on overcommit systems
_mi_current_thread_count() > 1 && // do not delay for the first N threads
tld->count < (size_t)mi_option_get(mi_option_eager_commit_delay));
const bool eager = !eager_delayed && mi_option_is_enabled(mi_option_eager_commit);
bool commit = eager; // || (page_kind >= MI_PAGE_LARGE);