experiment with commit strategy on macOS

This commit is contained in:
daan 2020-09-06 09:39:16 -07:00
parent e2ae9f3125
commit 5ae01fe4d9

View file

@ -715,7 +715,7 @@ static bool mi_os_commitx(void* addr, size_t size, bool commit, bool conservativ
} }
#elif defined(__wasi__) #elif defined(__wasi__)
// WebAssembly guests can't control memory protection // WebAssembly guests can't control memory protection
#elif defined(MAP_FIXED) #elif defined(MAP_FIXED) && !defined(__APPLE__)
if (!commit) { if (!commit) {
// use mmap with MAP_FIXED to discard the existing memory (and reduce commit charge) // use mmap with MAP_FIXED to discard the existing memory (and reduce commit charge)
const int fd = mi_unix_mmap_fd(); const int fd = mi_unix_mmap_fd();