diff options
Diffstat (limited to 'src/common/memory_util.cpp')
| -rw-r--r-- | src/common/memory_util.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/common/memory_util.cpp b/src/common/memory_util.cpp index c19729b21..759ad02ca 100644 --- a/src/common/memory_util.cpp +++ b/src/common/memory_util.cpp | |||
| @@ -40,11 +40,12 @@ void* AllocateExecutableMemory(size_t size, bool low) { | |||
| 40 | if (low && (!map_hint)) | 40 | if (low && (!map_hint)) |
| 41 | map_hint = (char*)round_page(512 * 1024 * 1024); /* 0.5 GB rounded up to the next page */ | 41 | map_hint = (char*)round_page(512 * 1024 * 1024); /* 0.5 GB rounded up to the next page */ |
| 42 | #endif | 42 | #endif |
| 43 | void* ptr = mmap(map_hint, size, PROT_READ | PROT_WRITE | PROT_EXEC, MAP_ANON | MAP_PRIVATE | 43 | void* ptr = mmap(map_hint, size, PROT_READ | PROT_WRITE | PROT_EXEC, |
| 44 | MAP_ANON | MAP_PRIVATE | ||
| 44 | #if defined(ARCHITECTURE_X64) && defined(MAP_32BIT) | 45 | #if defined(ARCHITECTURE_X64) && defined(MAP_32BIT) |
| 45 | | (low ? MAP_32BIT : 0) | 46 | | (low ? MAP_32BIT : 0) |
| 46 | #endif | 47 | #endif |
| 47 | , | 48 | , |
| 48 | -1, 0); | 49 | -1, 0); |
| 49 | #endif /* defined(_WIN32) */ | 50 | #endif /* defined(_WIN32) */ |
| 50 | 51 | ||