diff --git a/src/core/system.cpp b/src/core/system.cpp index 36e13118c..900bd5a27 100644 --- a/src/core/system.cpp +++ b/src/core/system.cpp @@ -332,7 +332,7 @@ bool System::Internal::CPUThreadInitialize(Error* error) } #endif - if (!Bus::AllocateMemory(error) || !CPU::CodeCache::ProcessStartup(error)) + if (!CPU::CodeCache::ProcessStartup(error) || !Bus::AllocateMemory(error)) { CPUThreadShutdown(); return false; diff --git a/src/util/jit_code_buffer.cpp b/src/util/jit_code_buffer.cpp index a463bf813..2e4976a31 100644 --- a/src/util/jit_code_buffer.cpp +++ b/src/util/jit_code_buffer.cpp @@ -60,7 +60,7 @@ bool JitCodeBuffer::Allocate(u32 size /* = 64 * 1024 * 1024 */, u32 far_code_siz reinterpret_cast(std::numeric_limits::max()) : (base + max_displacement); const u8* min_address = ((base - max_displacement) > base) ? nullptr : (base - max_displacement); - const u32 step = 256 * 1024 * 1024; + const u32 step = 64 * 1024 * 1024; const u32 steps = static_cast(max_address - min_address) / step; for (u32 offset = 0; offset < steps; offset++) {