VirtualQuery fix

Due to limitations of certain platforms, we initialize our vma_map with 3 separate free mappings.
As such, we need to use a while loop here to accurately query mappings with high addresses
This commit is contained in:
Stephen Miller 2025-05-03 12:03:59 -05:00
parent 3d50eeeebb
commit 31ae988abe

View File

@ -596,7 +596,7 @@ int MemoryManager::VirtualQuery(VAddr addr, int flags,
}
auto it = FindVMA(query_addr);
if (it->second.type == VMAType::Free && flags == 1) {
while (it->second.type == VMAType::Free && flags == 1 && it != vma_map.end()) {
++it;
}
if (it->second.type == VMAType::Free) {