From b5f1bd99e6f44869e3f89a6d0c9586904558015d Mon Sep 17 00:00:00 2001 From: Stephen Miller Date: Tue, 27 May 2025 08:57:51 -0500 Subject: [PATCH] Revert "Update memory.cpp" This reverts commit 2c55d014c0efbdfadee4121b01e1dcf5af60e63d. --- src/core/memory.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/core/memory.cpp b/src/core/memory.cpp index fa7827ffa..15a71528b 100644 --- a/src/core/memory.cpp +++ b/src/core/memory.cpp @@ -797,14 +797,14 @@ VAddr MemoryManager::SearchFree(VAddr virtual_addr, size_t size, u32 alignment) virtual_addr = Common::AlignUp(virtual_addr, alignment); auto it = FindVMA(virtual_addr); - // If the VMA is not mapped and contains the requested mapping, we are done. - if (!it->second.IsMapped() && it->second.Contains(virtual_addr, size)) { + // If the VMA is free and contains the requested mapping we are done. + if (it->second.IsFree() && it->second.Contains(virtual_addr, size)) { return virtual_addr; } // Search for the first free VMA that fits our mapping. while (it != vma_map.end()) { - if (it->second.IsMapped()) { + if (!it->second.IsFree()) { it++; continue; }