do not delay eager commit for the main thread
This commit is contained in:
parent
f72e5688f5
commit
d2de66b8fa
@ -579,7 +579,8 @@ static mi_segment_t* mi_segment_init(mi_segment_t* segment, size_t required, mi_
|
|||||||
mi_assert_internal(segment_size >= required);
|
mi_assert_internal(segment_size >= required);
|
||||||
|
|
||||||
// Initialize parameters
|
// Initialize parameters
|
||||||
const bool eager_delayed = (page_kind <= MI_PAGE_MEDIUM && tld->count < (size_t)mi_option_get(mi_option_eager_commit_delay));
|
const bool eager_delayed = (page_kind <= MI_PAGE_MEDIUM && !_mi_is_main_thread() &&
|
||||||
|
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);
|
const bool eager = !eager_delayed && mi_option_is_enabled(mi_option_eager_commit);
|
||||||
bool commit = eager; // || (page_kind >= MI_PAGE_LARGE);
|
bool commit = eager; // || (page_kind >= MI_PAGE_LARGE);
|
||||||
bool pages_still_good = false;
|
bool pages_still_good = false;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user