mirror of
https://github.com/momo5502/emulator.git
synced 2026-01-12 00:56:16 +00:00
Support implicit memory reserving
This commit is contained in:
@@ -1806,11 +1806,9 @@ namespace
|
||||
throw std::runtime_error("Unsupported allocation type!");
|
||||
}
|
||||
|
||||
if (commit && !reserve)
|
||||
if (commit && !reserve && c.emu.commit_memory(potential_base, allocation_bytes, protection))
|
||||
{
|
||||
return c.emu.commit_memory(potential_base, allocation_bytes, protection)
|
||||
? STATUS_SUCCESS
|
||||
: STATUS_MEMORY_NOT_ALLOCATED;
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
return c.emu.allocate_memory(potential_base, allocation_bytes, protection, !commit)
|
||||
|
||||
Reference in New Issue
Block a user