mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-07-07 11:58:41 +03:00
experiment with commit strategy on macOS
This commit is contained in:
parent
e2ae9f3125
commit
5ae01fe4d9
1 changed files with 1 additions and 1 deletions
2
src/os.c
2
src/os.c
|
@ -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();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue