vm: Fix access violations on super memory, support super memory in vm::get_addr

This commit is contained in:
Eladash 2020-12-26 12:04:45 +02:00 committed by Ivan
parent 4399324955
commit 66581d115b
4 changed files with 39 additions and 31 deletions

View file

@ -39,10 +39,10 @@ namespace vm
}
// Emulated virtual memory
u8* const g_base_addr = memory_reserve_4GiB(reinterpret_cast<void*>(0x2'0000'0000));
u8* const g_base_addr = memory_reserve_4GiB(reinterpret_cast<void*>(0x2'0000'0000), 0x2'0000'0000);
// Unprotected virtual memory mirror
u8* const g_sudo_addr = memory_reserve_4GiB(g_base_addr);
u8* const g_sudo_addr = g_base_addr + 0x1'0000'0000;
// Auxiliary virtual memory for executable areas
u8* const g_exec_addr = memory_reserve_4GiB(g_sudo_addr, 0x200000000);
@ -1671,7 +1671,7 @@ namespace vm
{
g_locations.clear();
utils::memory_decommit(g_base_addr, 0x100000000);
utils::memory_decommit(g_base_addr, 0x200000000);
utils::memory_decommit(g_exec_addr, 0x100000000);
utils::memory_decommit(g_stat_addr, 0x100000000);
}