Merge pull request #729 from StevenMiller123/VirtualQuery-Fixes
Some checks are pending
Reuse / reuse (push) Waiting to run
Clang Format / clang-format (push) Waiting to run
Linux-Qt / build (push) Waiting to run
Linux / build (push) Waiting to run
macOS-Qt / build (push) Waiting to run
macOS / build (push) Waiting to run
Windows-Qt / build (push) Waiting to run
Windows / build (push) Waiting to run

Fix VirtualQuery
This commit is contained in:
georgemoralis 2024-09-02 07:18:33 +03:00 committed by GitHub
commit 3b0e251518
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -308,9 +308,10 @@ int MemoryManager::VirtualQuery(VAddr addr, int flags,
const auto& vma = it->second;
info->start = vma.base;
info->end = vma.base + vma.size;
info->protection = static_cast<s32>(vma.prot);
info->is_flexible.Assign(vma.type == VMAType::Flexible);
info->is_direct.Assign(vma.type == VMAType::Direct);
info->is_commited.Assign(vma.type != VMAType::Free);
info->is_commited.Assign(vma.type != VMAType::Free && vma.type != VMAType::Reserved);
vma.name.copy(info->name.data(), std::min(info->name.size(), vma.name.size()));
if (vma.type == VMAType::Direct) {
const auto dmem_it = FindDmemArea(vma.phys_base);