mirror of
https://github.com/momo5502/emulator.git
synced 2026-01-18 19:23:56 +00:00
More cleanup and fixes
This commit is contained in:
@@ -400,21 +400,13 @@ namespace
|
||||
|
||||
while (true)
|
||||
{
|
||||
try
|
||||
succeeded = emu.try_map_memory(allocation_base, allocation_bytes, protection);
|
||||
if (succeeded || !allocate_anywhere)
|
||||
{
|
||||
emu.map_memory(allocation_base, allocation_bytes, protection);
|
||||
succeeded = true;
|
||||
break;
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
if (!allocate_anywhere)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
allocation_base += allocation_granularity;
|
||||
}
|
||||
allocation_base += allocation_granularity;
|
||||
}
|
||||
|
||||
base_address.write(allocation_base);
|
||||
@@ -463,22 +455,13 @@ namespace
|
||||
|
||||
while (true)
|
||||
{
|
||||
try
|
||||
succeeded = emu.try_map_memory(allocation_base, allocation_bytes, protection);
|
||||
if (succeeded || !allocate_anywhere)
|
||||
{
|
||||
emu.map_memory(allocation_base, allocation_bytes, protection);
|
||||
succeeded = true;
|
||||
break;
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
succeeded = false;
|
||||
if (!allocate_anywhere)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
allocation_base += allocation_granularity;
|
||||
}
|
||||
allocation_base += allocation_granularity;
|
||||
}
|
||||
|
||||
base_address.write(allocation_base);
|
||||
|
||||
Reference in New Issue
Block a user