[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.

svn path=/trunk/; revision=47587
This commit is contained in:
Sir Richard 2010-06-05 14:54:26 +00:00
parent 89c8d4178c
commit a2a190f44b

View file

@ -64,7 +64,6 @@ MiDeleteSystemPageableVm(IN PMMPTE PointerPte,
/* 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 @@ MiDeleteSystemPageableVm(IN PMMPTE PointerPte,
/* 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++;