mirror of
https://github.com/reactos/reactos.git
synced 2025-01-12 17:16:58 +00:00
[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:
parent
89c8d4178c
commit
a2a190f44b
1 changed files with 14 additions and 1 deletions
|
@ -64,7 +64,6 @@ MiDeleteSystemPageableVm(IN PMMPTE PointerPte,
|
||||||
/* As always, only handle current ARM3 scenarios */
|
/* As always, only handle current ARM3 scenarios */
|
||||||
ASSERT(PointerPte->u.Soft.Prototype == 0);
|
ASSERT(PointerPte->u.Soft.Prototype == 0);
|
||||||
ASSERT(PointerPte->u.Soft.Transition == 0);
|
ASSERT(PointerPte->u.Soft.Transition == 0);
|
||||||
ASSERT(PointerPte->u.Hard.Valid == 1);
|
|
||||||
|
|
||||||
/* Normally this is one possibility -- freeing a valid page */
|
/* Normally this is one possibility -- freeing a valid page */
|
||||||
if (PointerPte->u.Hard.Valid)
|
if (PointerPte->u.Hard.Valid)
|
||||||
|
@ -106,6 +105,20 @@ MiDeleteSystemPageableVm(IN PMMPTE PointerPte,
|
||||||
/* Actual legitimate pages */
|
/* Actual legitimate pages */
|
||||||
ActualPages++;
|
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 */
|
/* Keep going */
|
||||||
PointerPte++;
|
PointerPte++;
|
||||||
|
|
Loading…
Reference in a new issue