From c1e53d213eb251fb030e91310b8fe33022c56fbf Mon Sep 17 00:00:00 2001 From: raphaelthegreat <47210458+raphaelthegreat@users.noreply.github.com> Date: Mon, 10 Jun 2024 19:49:11 +0300 Subject: [PATCH] memory: Add lock to VirtualQuery and remove debug print --- src/core/memory.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/memory.cpp b/src/core/memory.cpp index 0c5d127fb..a60680539 100644 --- a/src/core/memory.cpp +++ b/src/core/memory.cpp @@ -135,8 +135,6 @@ void MemoryManager::UnmapMemory(VAddr virtual_addr, size_t size) { "Attempting to unmap partially mapped range"); const auto type = it->second.type; - fmt::print("{}\n", u32(type)); - std::fflush(stdout); const PAddr phys_addr = type == VMAType::Direct ? it->second.phys_base : -1; if (type == VMAType::Direct) { UnmapVulkanMemory(virtual_addr, size); @@ -168,6 +166,8 @@ int MemoryManager::QueryProtection(VAddr addr, void** start, void** end, u32* pr int MemoryManager::VirtualQuery(VAddr addr, int flags, Libraries::Kernel::OrbisVirtualQueryInfo* info) { + std::scoped_lock lk{mutex}; + auto it = FindVMA(addr); if (it->second.type == VMAType::Free && flags == 1) { it++;