1
0
mirror of https://github.com/RPCS3/rpcs3.git synced 2024-11-26 04:32:35 +01:00

Dealloc exec cache after sys_prx/overlay_unload_module

Must come before vm::dealloc of it.
This commit is contained in:
Eladash 2019-07-10 22:56:56 +03:00 committed by Ivan
parent 3d6c211382
commit 3de885c7a6
2 changed files with 11 additions and 0 deletions

View File

@ -1036,6 +1036,12 @@ void ppu_unload_prx(const lv2_prx& prx)
for (auto& seg : prx.segs)
{
if (seg.flags & 1)
{
// Segment was considered executable thus needing to free exec data
utils::memory_decommit(vm::g_exec_addr + size_t{seg.addr} * 2, size_t{seg.size} * 2);
}
vm::dealloc(seg.addr, vm::main);
}
}

View File

@ -54,6 +54,11 @@ error_code sys_overlay_unload_module(u32 ovlmid)
for (auto& seg : _main->segs)
{
if (seg.flags & 1)
{
utils::memory_decommit(vm::g_exec_addr + size_t{seg.addr} * 2, size_t{seg.size} * 2);
}
vm::dealloc(seg.addr);
}