Author: sir_richard
Date: Sat Mar 31 20:07:29 2012
New Revision: 56290
URL:
http://svn.reactos.org/svn/reactos?rev=56290&view=rev
Log:
[NTOS]: Support getting the protection mask for other kinds of VADs in
NtQueryVirtualMemory, instead of an ASSERT.
Modified:
trunk/reactos/ntoskrnl/mm/ARM3/virtual.c
Modified: trunk/reactos/ntoskrnl/mm/ARM3/virtual.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/ARM3/virtual.c…
==============================================================================
--- trunk/reactos/ntoskrnl/mm/ARM3/virtual.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/mm/ARM3/virtual.c [iso-8859-1] Sat Mar 31 20:07:29 2012
@@ -1430,8 +1430,20 @@
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);