mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-26 07:45:33 +01:00
MemoryUtil: Remove __builtin_available for macOS 10.14
This commit is contained in:
parent
6e2febd404
commit
1cb3058abe
@ -41,11 +41,7 @@ void* AllocateExecutableMemory(size_t size)
|
|||||||
#else
|
#else
|
||||||
int map_flags = MAP_ANON | MAP_PRIVATE;
|
int map_flags = MAP_ANON | MAP_PRIVATE;
|
||||||
#if defined(__APPLE__)
|
#if defined(__APPLE__)
|
||||||
// This check is in place to prepare for x86_64 MAP_JIT support. While MAP_JIT did exist
|
map_flags |= MAP_JIT;
|
||||||
// prior to 10.14, it had restrictions on the number of JIT allocations that were removed
|
|
||||||
// in 10.14.
|
|
||||||
if (__builtin_available(macOS 10.14, *))
|
|
||||||
map_flags |= MAP_JIT;
|
|
||||||
#endif
|
#endif
|
||||||
void* ptr = mmap(nullptr, size, PROT_READ | PROT_WRITE | PROT_EXEC, map_flags, -1, 0);
|
void* ptr = mmap(nullptr, size, PROT_READ | PROT_WRITE | PROT_EXEC, map_flags, -1, 0);
|
||||||
if (ptr == MAP_FAILED)
|
if (ptr == MAP_FAILED)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user