diff --git a/src/options.c b/src/options.c index c9c92003..89048c7d 100644 --- a/src/options.c +++ b/src/options.c @@ -60,7 +60,7 @@ static mi_option_desc_t options[_mi_option_last] = { 0, UNINIT, MI_OPTION(verbose) }, // the following options are experimental and not all combinations make sense. - { 1, UNINIT, MI_OPTION(eager_commit) }, // commit on demand? + { 0, UNINIT, MI_OPTION(eager_commit) }, // commit on demand? #if defined(_WIN32) || (MI_INTPTR_SIZE <= 4) // and other OS's without overcommit? { 0, UNINIT, MI_OPTION(eager_region_commit) }, { 0, UNINIT, MI_OPTION(reset_decommits) }, // reset decommits memory @@ -79,7 +79,7 @@ static mi_option_desc_t options[_mi_option_last] = #else { 1, UNINIT, MI_OPTION(eager_commit_delay) }, // the first N segments per thread are not eagerly committed #endif - { 1, UNINIT, MI_OPTION(allow_decommit) }, // decommit pages when not eager committed + { 1, UNINIT, MI_OPTION(allow_decommit) }, // decommit pages when not eager committed { 100, UNINIT, MI_OPTION(reset_delay) }, // reset delay in milli-seconds { 1000, UNINIT, MI_OPTION(arena_reset_delay) }, // reset delay in milli-seconds { 0, UNINIT, MI_OPTION(use_numa_nodes) }, // 0 = use available numa nodes, otherwise use at most N nodes. diff --git a/src/segment.c b/src/segment.c index b8e5f2ec..ed587d5b 100644 --- a/src/segment.c +++ b/src/segment.c @@ -671,7 +671,8 @@ static mi_segment_t* mi_segment_init(mi_segment_t* segment, size_t required, mi_ if (!commit) { // at least commit the info slices mi_assert_internal(MI_COMMIT_SIZE > info_slices*MI_SEGMENT_SLICE_SIZE); - _mi_os_commit(segment, MI_COMMIT_SIZE, &is_zero, tld->stats); + bool ok = _mi_os_commit(segment, MI_COMMIT_SIZE, &is_zero, tld->stats); + if (!ok) return NULL; // failed to commit } segment->memid = memid; segment->mem_is_fixed = mem_large;