memory: take the address-space lock shared for tracker protections

This commit is contained in:
nmzik
2026-10-23 23:53:51 +02:00
parent 6aaa533296
commit 07f6420273
2 changed files with 42 additions and 2 deletions
+2 -2
View File
@@ -820,12 +820,12 @@ public:
return ProtectMappedUnlocked(vaddr, size, mode);
}
// Tracker protections only read m_mapped; the page tracker orders them per page.
bool ProtectTransient(uint64_t vaddr, uint64_t size, VirtualMemory::Mode mode) {
if (size == 0 || UINT64_MAX - vaddr < size) {
return false;
}
std::lock_guard lock(m_mutex);
std::shared_lock lock(m_mutex);
return ProtectMappedUnlocked(vaddr, size, mode);
}