mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-09 08:21:29 +12:00
Dealloc exec cache after sys_prx/overlay_unload_module
Must come before vm::dealloc of it.
This commit is contained in:
parent
3d6c211382
commit
3de885c7a6
2 changed files with 11 additions and 0 deletions
|
@ -1036,6 +1036,12 @@ void ppu_unload_prx(const lv2_prx& prx)
|
||||||
|
|
||||||
for (auto& seg : prx.segs)
|
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);
|
vm::dealloc(seg.addr, vm::main);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -54,6 +54,11 @@ error_code sys_overlay_unload_module(u32 ovlmid)
|
||||||
|
|
||||||
for (auto& seg : _main->segs)
|
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);
|
vm::dealloc(seg.addr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue