Author: jgardou
Date: Fri Aug 29 09:21:35 2014
New Revision: 63977
URL:
http://svn.reactos.org/svn/reactos?rev=63977&view=rev
Log:
[NTOS/MM]
- Properly decrement pagetable frame entry share count when unmapping a system-mapped
section
- Handle the PTE dirty bit
Modified:
trunk/reactos/ntoskrnl/mm/ARM3/section.c
Modified: trunk/reactos/ntoskrnl/mm/ARM3/section.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/ARM3/section.c…
==============================================================================
--- trunk/reactos/ntoskrnl/mm/ARM3/section.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/mm/ARM3/section.c [iso-8859-1] Fri Aug 29 09:21:35 2014
@@ -2204,7 +2204,9 @@
OldIrql = KeAcquireQueuedSpinLock(LockQueuePfnLock);
ASSERT(((Pfn1->u3.e1.PrototypePte) &&
(Pfn1->OriginalPte.u.Soft.Prototype)) == 0);
- /* FIXME: Dirty bit management */
+ /* Mark the page as modified accordingly */
+ if (PteContents.u.Hard.Dirty)
+ Pfn1->u3.e1.Modified = 1;
/* Was the PDE invalid */
if (PointerPde->u.Long == 0)
@@ -2223,7 +2225,7 @@
/* Dereference the PDE and the PTE */
Pfn2 = MiGetPfnEntry(PFN_FROM_PTE(PointerPde));
- //MiDecrementShareCount(Pfn2, PFN_FROM_PTE(PointerPde));
+ MiDecrementShareCount(Pfn2, PFN_FROM_PTE(PointerPde));
DBG_UNREFERENCED_LOCAL_VARIABLE(Pfn2);
MiDecrementShareCount(Pfn1, PFN_FROM_PTE(&PteContents));