Author: greatlrd Date: Wed Jan 31 20:04:49 2007 New Revision: 25665
URL: http://svn.reactos.org/svn/reactos?rev=25665&view=rev Log: merge trunk rev : 25656 to 0.3.1 branch - fixing my rmap problem in vmware
Modified: branches/ros-branch-0_3_1/reactos/ntoskrnl/mm/freelist.c
Modified: branches/ros-branch-0_3_1/reactos/ntoskrnl/mm/freelist.c URL: http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_1/reactos/ntoskrn... ============================================================================== --- branches/ros-branch-0_3_1/reactos/ntoskrnl/mm/freelist.c (original) +++ branches/ros-branch-0_3_1/reactos/ntoskrnl/mm/freelist.c Wed Jan 31 20:04:49 2007 @@ -479,7 +479,9 @@ MmPageArray[j].Flags.Type = MM_PHYSICAL_PAGE_USED; MmPageArray[j].Flags.Zero = 0; MmPageArray[j].Flags.Consumer = MC_NPPOOL; - MmPageArray[j].ReferenceCount = 1; + /* Reference count 2, because we're having ReferenceCount track + MapCount as well. */ + MmPageArray[j].ReferenceCount = 2; MmPageArray[j].MapCount = 1; InsertTailList(&UsedPageListHeads[MC_NPPOOL], &MmPageArray[j].ListEntry); @@ -519,7 +521,7 @@ MmPageArray[i].Flags.Type = MM_PHYSICAL_PAGE_USED; MmPageArray[i].Flags.Zero = 0; MmPageArray[i].Flags.Consumer = MC_NPPOOL; - MmPageArray[i].ReferenceCount = 1; + MmPageArray[i].ReferenceCount = 2; MmPageArray[i].MapCount = 1; InsertTailList(&UsedPageListHeads[MC_NPPOOL], &MmPageArray[i].ListEntry); @@ -588,6 +590,7 @@ KEBUGCHECK(0); } MmPageArray[Pfn].MapCount++; + MmPageArray[Pfn].ReferenceCount++; KeReleaseSpinLock(&PageListLock, oldIrql); } } @@ -612,6 +615,7 @@ KEBUGCHECK(0); } MmPageArray[Pfn].MapCount--; + MmPageArray[Pfn].ReferenceCount--; KeReleaseSpinLock(&PageListLock, oldIrql); } }