mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-08-24 00:04:48 +03:00
Compare commits
2 commits
bea8a12d3d
...
8b2f774656
Author | SHA1 | Date | |
---|---|---|---|
![]() |
8b2f774656 | ||
![]() |
25fdd50666 |
2 changed files with 14 additions and 15 deletions
|
@ -6,10 +6,8 @@
|
|||
trigger:
|
||||
branches:
|
||||
include:
|
||||
- master
|
||||
- dev
|
||||
- dev2
|
||||
- dev3
|
||||
- main
|
||||
- dev*
|
||||
tags:
|
||||
include:
|
||||
- v*
|
||||
|
|
|
@ -216,9 +216,11 @@ static mi_decl_noinline void* mi_arena_try_alloc_at(
|
|||
// now actually commit
|
||||
bool commit_zero = false;
|
||||
if (!_mi_os_commit_ex(p, mi_size_of_slices(slice_count), &commit_zero, mi_size_of_slices(slice_count - already_committed_count))) {
|
||||
memid->initially_committed = false;
|
||||
// if the commit fails, roll back and return NULL
|
||||
_mi_arenas_free(p, mi_size_of_slices(slice_count), *memid); // this will decommit as well (if partially committed)
|
||||
return NULL;
|
||||
}
|
||||
else {
|
||||
|
||||
// committed
|
||||
if (commit_zero) { memid->initially_zero = true; }
|
||||
#if MI_DEBUG > 1
|
||||
|
@ -230,7 +232,6 @@ static mi_decl_noinline void* mi_arena_try_alloc_at(
|
|||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
else {
|
||||
// already fully commited.
|
||||
// if the OS has overcommit, and this is the first time we access these pages, then
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue