mirror of
https://github.com/KytyPS5/KytyPS5.git
synced 2026-10-28 13:56:59 +01:00
memory: retain allocation nodes on partial release
This commit is contained in:
@@ -1235,11 +1235,10 @@ bool PhysicalMemory::Release(uint64_t start, size_t len) {
|
|||||||
if (block.kind == AllocationKind::Automatic) {
|
if (block.kind == AllocationKind::Automatic) {
|
||||||
RemoveFreeRange(m_automatic_free, start, len);
|
RemoveFreeRange(m_automatic_free, start, len);
|
||||||
}
|
}
|
||||||
m_physical.erase(it);
|
|
||||||
if (block.start_addr < start) {
|
if (block.start_addr < start) {
|
||||||
auto left = block;
|
it->second.size = start - block.start_addr;
|
||||||
left.size = start - block.start_addr;
|
} else {
|
||||||
m_physical.emplace(left.start_addr, left);
|
m_physical.erase(it);
|
||||||
}
|
}
|
||||||
if (start + len < block.start_addr + block.size) {
|
if (start + len < block.start_addr + block.size) {
|
||||||
auto right = block;
|
auto right = block;
|
||||||
|
|||||||
Reference in New Issue
Block a user