mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-12-01 00:21:43 +00:00
- fixed crash on JIT allocations over 1 MB
https://forum.zdoom.org/viewtopic.php?t=64383
This commit is contained in:
parent
5f871b7aa0
commit
dd7ec1fe44
1 changed files with 2 additions and 1 deletions
|
@ -55,8 +55,9 @@ static void *AllocJitMemory(size_t size)
|
|||
}
|
||||
else
|
||||
{
|
||||
const size_t bytesToAllocate = MAX(size_t(1024 * 1024), size);
|
||||
size_t allocatedSize = 0;
|
||||
void *p = OSUtils::allocVirtualMemory(1024 * 1024, &allocatedSize, OSUtils::kVMWritable | OSUtils::kVMExecutable);
|
||||
void *p = OSUtils::allocVirtualMemory(bytesToAllocate, &allocatedSize, OSUtils::kVMWritable | OSUtils::kVMExecutable);
|
||||
if (!p)
|
||||
return nullptr;
|
||||
JitBlocks.Push((uint8_t*)p);
|
||||
|
|
Loading…
Reference in a new issue