merge from dev

This commit is contained in:
daanx 2023-04-21 11:35:48 -07:00
commit 6faff49998
8 changed files with 42 additions and 21 deletions

View file

@ -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);