From 980be9e0e821d66d78684b4e641b750b80592524 Mon Sep 17 00:00:00 2001 From: Nekotekina Date: Mon, 22 Feb 2021 13:32:35 +0300 Subject: [PATCH] JIT.cpp: fix overcommit bug (should have been Linux-specific) Closes #9820 Co-authored-by: Eladash --- Utilities/JIT.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Utilities/JIT.cpp b/Utilities/JIT.cpp index 1c7373d1df..221aa2359b 100644 --- a/Utilities/JIT.cpp +++ b/Utilities/JIT.cpp @@ -23,8 +23,10 @@ static u8* get_jit_memory() static void* const s_memory2 = []() -> void* { void* ptr = utils::memory_reserve(0x80000000); +#ifdef CAN_OVERCOMMIT utils::memory_commit(ptr, 0x80000000); utils::memory_protect(ptr, 0x40000000, utils::protection::wx); +#endif return ptr; }();