Author: sir_richard
Date: Sat Jun 5 16:54:26 2010
New Revision: 47587
URL:
http://svn.reactos.org/svn/reactos?rev=47587&view=rev
Log:
[NTOS]: In MiDeleteSystemPageableVm, should also handle the case where the PTE is
demand-zero. This can happen if the caller allocated, say, 12KB (3 pages) of paged pool,
only touched 4KB (1 page), and then frees the allocation -- the other 2 pages will still
be demand-zero at this point.
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 Jun 5 16:54:26 2010
@@ -64,7 +64,6 @@
/* As always, only handle current ARM3 scenarios */
ASSERT(PointerPte->u.Soft.Prototype == 0);
ASSERT(PointerPte->u.Soft.Transition == 0);
- ASSERT(PointerPte->u.Hard.Valid == 1);
/* Normally this is one possibility -- freeing a valid page */
if (PointerPte->u.Hard.Valid)
@@ -106,6 +105,20 @@
/* Actual legitimate pages */
ActualPages++;
}
+ else
+ {
+ /*
+ * The only other ARM3 possibility is a demand zero page, which would
+ * mean freeing some of the paged pool pages that haven't even been
+ * touched yet, as part of a larger allocation.
+ *
+ * Right now, we shouldn't expect any page file information in the PTE
+ */
+ ASSERT(PointerPte->u.Soft.PageFileHigh == 0);
+
+ /* Destroy the PTE */
+ PointerPte->u.Long = 0;
+ }
/* Keep going */
PointerPte++;