diff options
author | Roman Dubtsov <[email protected]> | 2019-12-04 16:20:40 -0800 |
---|---|---|
committer | Roman Dubtsov <[email protected]> | 2019-12-04 16:21:58 -0800 |
commit | 4443d791e096d6781874975ac96cddcd8a2508cc (patch) | |
tree | 0e71db915c761292088171476277b9bcdac5edac | |
parent | 20ee4c2d8bc69a6b0f738966cadf12b68a8fde7b (diff) | |
download | xbyak-4443d791e096d6781874975ac96cddcd8a2508cc.tar.gz xbyak-4443d791e096d6781874975ac96cddcd8a2508cc.zip |
specify MAP_JIT mmap flag on macOS
-rw-r--r-- | xbyak/xbyak.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/xbyak/xbyak.h b/xbyak/xbyak.h index e4a47f4..a534334 100644 --- a/xbyak/xbyak.h +++ b/xbyak/xbyak.h @@ -336,7 +336,9 @@ public: { const size_t alignedSizeM1 = inner::ALIGN_PAGE_SIZE - 1; size = (size + alignedSizeM1) & ~alignedSizeM1; -#ifdef MAP_ANONYMOUS +#if defined(__APPLE__) && defined(MAP_JIT) + const int mode = MAP_PRIVATE | MAP_ANONYMOUS | MAP_JIT; +#elif defined(MAP_ANONYMOUS) const int mode = MAP_PRIVATE | MAP_ANONYMOUS; #elif defined(MAP_ANON) const int mode = MAP_PRIVATE | MAP_ANON; |