rename to arena_eager_commit

This commit is contained in:
daanx 2023-04-03 19:57:26 -07:00
parent d22a13c990
commit 33d7503fdb
3 changed files with 4 additions and 4 deletions

View File

@ -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

View File

@ -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);

View File

@ -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