From 696287a5ed7d89d9040d6c1fa929ef2e429debd5 Mon Sep 17 00:00:00 2001 From: Sir Richard Date: Sat, 31 Mar 2012 20:07:29 +0000 Subject: [PATCH] [NTOS]: Support getting the protection mask for other kinds of VADs in NtQueryVirtualMemory, instead of an ASSERT. svn path=/trunk/; revision=56290 --- reactos/ntoskrnl/mm/ARM3/virtual.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/reactos/ntoskrnl/mm/ARM3/virtual.c b/reactos/ntoskrnl/mm/ARM3/virtual.c index bef8534d244..f4f33d819a9 100644 --- a/reactos/ntoskrnl/mm/ARM3/virtual.c +++ b/reactos/ntoskrnl/mm/ARM3/virtual.c @@ -1430,8 +1430,20 @@ MiQueryMemoryBasicInformation(IN HANDLE ProcessHandle, return Status; } - /* This must be a VM VAD */ - ASSERT(Vad->u.VadFlags.PrivateMemory); + /* Set the correct memory type based on what kind of VAD this is */ + if ((Vad->u.VadFlags.PrivateMemory) || + (Vad->u.VadFlags.VadType == VadRotatePhysical)) + { + MemoryInfo.Type = MEM_PRIVATE; + } + else if (Vad->u.VadFlags.VadType == VadImageMap) + { + MemoryInfo.Type = MEM_IMAGE; + } + else + { + MemoryInfo.Type = MEM_MAPPED; + } /* Lock the address space of the process */ MmLockAddressSpace(&TargetProcess->Vm);