mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-07-01 09:14:38 +03:00
fix base address if commit fails on aligned overallocation
This commit is contained in:
parent
21425bc334
commit
6c3d75a355
1 changed files with 1 additions and 1 deletions
2
src/os.c
2
src/os.c
|
@ -301,7 +301,7 @@ static void* mi_os_prim_alloc_aligned(size_t size, size_t alignment, bool commit
|
||||||
// explicitly commit only the aligned part
|
// explicitly commit only the aligned part
|
||||||
if (commit) {
|
if (commit) {
|
||||||
if (!_mi_os_commit(p, size, NULL)) {
|
if (!_mi_os_commit(p, size, NULL)) {
|
||||||
mi_os_prim_free(p, over_size, 0);
|
mi_os_prim_free(*base, over_size, 0);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue