From cd0d92687121f54254cd2eee21265dca6d9fe672 Mon Sep 17 00:00:00 2001 From: Stephen Miller Date: Sat, 10 May 2025 13:05:58 -0500 Subject: [PATCH] Fix PoolDecommit Should fix the address space regressions in UE titles on Windows. --- src/core/memory.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/core/memory.cpp b/src/core/memory.cpp index a36b4a220..a38f07bde 100644 --- a/src/core/memory.cpp +++ b/src/core/memory.cpp @@ -473,10 +473,13 @@ void MemoryManager::PoolDecommit(VAddr virtual_addr, size_t size) { vma.name = "anon"; MergeAdjacent(vma_map, new_it); - // Unmap the memory region. - impl.Unmap(vma_base_addr, vma_base_size, start_in_vma, start_in_vma + size, phys_base, is_exec, - false, false); - TRACK_FREE(virtual_addr, "VMEM"); + if (vma_base.type != VMAType::Reserved && type != VMAType::PoolReserved) { + // Unmap the memory region. + impl.Unmap(vma_base_addr, vma_base_size, start_in_vma, start_in_vma + size, phys_base, is_exec, + false, false); + TRACK_FREE(virtual_addr, "VMEM"); + } + } s32 MemoryManager::UnmapMemory(VAddr virtual_addr, size_t size) {