diff --git a/include/mimalloc.h b/include/mimalloc.h index 6ade2e96..cb408acc 100644 --- a/include/mimalloc.h +++ b/include/mimalloc.h @@ -324,7 +324,7 @@ typedef enum mi_option_e { // some of the following options are experimental // (deprecated options are kept for binary backward compatibility with v1.x versions) mi_option_eager_commit, - mi_option_eager_arena_commit, + mi_option_arena_eager_commit, mi_option_purge_decommits, mi_option_large_os_pages, // use large (2MiB) OS pages, implies eager commit mi_option_reserve_huge_os_pages, // reserve N huge OS pages (1GiB) at startup diff --git a/src/arena.c b/src/arena.c index 57db9f7e..ca4c87a3 100644 --- a/src/arena.c +++ b/src/arena.c @@ -299,8 +299,8 @@ void* _mi_arena_alloc_aligned(size_t size, size_t alignment, size_t align_offset mi_arena_id_t arena_id = 0; bool arena_commit = _mi_os_has_overcommit(); - if (mi_option_get(mi_option_eager_arena_commit) == 1) { arena_commit = true; } - else if (mi_option_get(mi_option_eager_arena_commit) == 0) { arena_commit = false; } + if (mi_option_get(mi_option_arena_eager_commit) == 1) { arena_commit = true; } + else if (mi_option_get(mi_option_arena_eager_commit) == 0) { arena_commit = false; } if (mi_reserve_os_memory_ex(arena_reserve, arena_commit /* commit */, *large /* allow large*/, false /* exclusive */, &arena_id) == 0) { p = mi_arena_alloc_in(arena_id, numa_node, size, alignment, commit, large, is_pinned, is_zero, req_arena_id, memid, tld); diff --git a/src/options.c b/src/options.c index ca8bf5d8..3eeccaae 100644 --- a/src/options.c +++ b/src/options.c @@ -60,7 +60,7 @@ static mi_option_desc_t options[_mi_option_last] = // Some of the following options are experimental and not all combinations are valid. Use with care. { 1, UNINIT, MI_OPTION(eager_commit) }, // commit per segment directly (8MiB) (but see also `eager_commit_delay`) - { 2, UNINIT, MI_OPTION_LEGACY(eager_arena_commit,eager_region_commit) }, + { 2, UNINIT, MI_OPTION_LEGACY(arena_eager_commit,eager_region_commit) }, { 0, UNINIT, MI_OPTION_LEGACY(purge_decommits,reset_decommits) }, { 0, UNINIT, MI_OPTION(large_os_pages) }, // use large OS pages, use only with eager commit to prevent fragmentation of VMA's { 0, UNINIT, MI_OPTION(reserve_huge_os_pages) }, // per 1GiB huge pages