mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-07-01 09:14:38 +03:00
fix
This commit is contained in:
parent
076df2b8bb
commit
33d5ea5cd2
1 changed files with 3 additions and 3 deletions
|
@ -677,9 +677,9 @@ static mi_page_t* mi_arenas_page_alloc_fresh(size_t slice_count, size_t block_si
|
|||
commit_size = _mi_align_up(block_start + block_size, MI_PAGE_MIN_COMMIT_SIZE);
|
||||
if (commit_size > page_noguard_size) { commit_size = page_noguard_size; }
|
||||
bool is_zero;
|
||||
if (!mi_arena_commit( mi_memid_arena(memid), page, commit_size, &is_zero, 0)) {
|
||||
mi_os_prim_free(p, commit_size, commit_size);
|
||||
return NULL;
|
||||
if (!mi_arena_commit(mi_memid_arena(memid), page, commit_size, &is_zero,
|
||||
0)) {
|
||||
return NULL;
|
||||
}
|
||||
if (!memid.initially_zero && !is_zero) {
|
||||
_mi_memzero_aligned(page, commit_size);
|
||||
|
|
Loading…
Add table
Reference in a new issue