mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-07-12 14:18:42 +03:00
merge from dev
This commit is contained in:
commit
6faff49998
8 changed files with 42 additions and 21 deletions
|
@ -342,8 +342,9 @@ static void unix_mprotect_hint(int err) {
|
|||
#endif
|
||||
}
|
||||
|
||||
int _mi_prim_commit(void* start, size_t size) {
|
||||
int _mi_prim_commit(void* start, size_t size, bool* is_zero) {
|
||||
// commit: ensure we can access the area
|
||||
*is_zero = false;
|
||||
int err = mprotect(start, size, (PROT_READ | PROT_WRITE));
|
||||
if (err != 0) { err = errno; }
|
||||
unix_mprotect_hint(err);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue