mirror of
https://github.com/stenzek/duckstation.git
synced 2024-11-23 13:59:49 +00:00
System: Allocate JIT space before fastmem area
On Intel MacOS 14, the fastmem area gets allocated close to the executable base, leaving no region free +/- 2GB for the JIT area.
This commit is contained in:
parent
8c1228a7aa
commit
ebf50edb79
@ -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;
|
||||
|
@ -60,7 +60,7 @@ bool JitCodeBuffer::Allocate(u32 size /* = 64 * 1024 * 1024 */, u32 far_code_siz
|
||||
reinterpret_cast<const u8*>(std::numeric_limits<uintptr_t>::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<u32>(max_address - min_address) / step;
|
||||
for (u32 offset = 0; offset < steps; offset++)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user