mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-07-06 19:38:41 +03:00
fix bug in determination of block size in pre-reserved arena memory
This commit is contained in:
parent
d6bbc08119
commit
bcce4d52bf
2 changed files with 4 additions and 2 deletions
|
@ -498,7 +498,9 @@ 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((size_t)ksize*KiB, true, true);
|
||||
if (ksize > 0) {
|
||||
mi_reserve_os_memory(_mi_divide_up((size_t)ksize*KiB, MI_SEGMENT_SIZE), true, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue