mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-07-06 11:34:38 +03:00
ensure managed os memory is at least one arena block in size
This commit is contained in:
parent
bcce4d52bf
commit
22c2fd82cc
2 changed files with 4 additions and 2 deletions
|
@ -499,7 +499,7 @@ void mi_process_init(void) mi_attr_noexcept {
|
|||
if (mi_option_is_enabled(mi_option_reserve_os_memory)) {
|
||||
long ksize = mi_option_get(mi_option_reserve_os_memory);
|
||||
if (ksize > 0) {
|
||||
mi_reserve_os_memory(_mi_divide_up((size_t)ksize*KiB, MI_SEGMENT_SIZE), true, true);
|
||||
mi_reserve_os_memory((size_t)ksize*KiB, true, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue