Fix HAS_OVERCOMMIT usage in JIT.cpp

This commit is contained in:
Nekotekina 2020-11-05 18:50:19 +03:00
parent fc77fb9b4c
commit 7d56069243

View File

@ -10,7 +10,6 @@
#include <zlib.h> #include <zlib.h>
#ifdef __linux__ #ifdef __linux__
#include <sys/mman.h>
#define CAN_OVERCOMMIT #define CAN_OVERCOMMIT
#endif #endif
@ -22,11 +21,8 @@ static u8* get_jit_memory()
static void* const s_memory2 = []() -> void* static void* const s_memory2 = []() -> void*
{ {
void* ptr = utils::memory_reserve(0x80000000); void* ptr = utils::memory_reserve(0x80000000);
#ifdef CAN_OVERCOMMIT
utils::memory_commit(ptr, 0x80000000); utils::memory_commit(ptr, 0x80000000);
utils::memory_protect(ptr, 0x40000000, utils::protection::wx); utils::memory_protect(ptr, 0x40000000, utils::protection::wx);
#endif
return ptr; return ptr;
}(); }();