Fix PoolDecommit

Should fix the address space regressions in UE titles on Windows.
This commit is contained in:
Stephen Miller 2025-05-10 13:05:58 -05:00
parent d7b917cf1b
commit cd0d926871

View File

@ -473,12 +473,15 @@ void MemoryManager::PoolDecommit(VAddr virtual_addr, size_t size) {
vma.name = "anon"; vma.name = "anon";
MergeAdjacent(vma_map, new_it); MergeAdjacent(vma_map, new_it);
if (vma_base.type != VMAType::Reserved && type != VMAType::PoolReserved) {
// Unmap the memory region. // Unmap the memory region.
impl.Unmap(vma_base_addr, vma_base_size, start_in_vma, start_in_vma + size, phys_base, is_exec, impl.Unmap(vma_base_addr, vma_base_size, start_in_vma, start_in_vma + size, phys_base, is_exec,
false, false); false, false);
TRACK_FREE(virtual_addr, "VMEM"); TRACK_FREE(virtual_addr, "VMEM");
} }
}
s32 MemoryManager::UnmapMemory(VAddr virtual_addr, size_t size) { s32 MemoryManager::UnmapMemory(VAddr virtual_addr, size_t size) {
std::scoped_lock lk{mutex}; std::scoped_lock lk{mutex};
return UnmapMemoryImpl(virtual_addr, size); return UnmapMemoryImpl(virtual_addr, size);