Dealloc exec cache after sys_prx/overlay_unload_module
Must come before vm::dealloc of it.
This commit is contained in:
@@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user