Author: sir_richard
Date: Fri Feb 19 02:58:48 2010
New Revision: 45617
URL:
http://svn.reactos.org/svn/reactos?rev=45617&view=rev
Log:
[NTOS]: Stop storing the consumer in the PFN, as this value is never actually checked.
Clears up yet another misuse of the "real" PFN structure.
Modified:
trunk/reactos/ntoskrnl/mm/freelist.c
Modified: trunk/reactos/ntoskrnl/mm/freelist.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/freelist.c?rev…
==============================================================================
--- trunk/reactos/ntoskrnl/mm/freelist.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/mm/freelist.c [iso-8859-1] Fri Feb 19 02:58:48 2010
@@ -29,7 +29,6 @@
//
// REACTOS NT
//
-#define Consumer u3.e1.PageColor
#define RmapListHead AweReferenceCount
#define SavedSwapEntry u4.EntireFrame
#define RemoveEntryList(x) RemoveEntryList((PLIST_ENTRY)x)
@@ -59,8 +58,6 @@
MMPFNLIST MmModifiedPageListHead;
MMPFNLIST MmModifiedNoWritePageListHead;
-/* List of pages allocated to the MC_USER Consumer */
-static LIST_ENTRY UserPageListHead;
/* List of pages zeroed by the ZPW (MmZeroPageThreadMain) */
static LIST_ENTRY FreeZeroedPageListHead;
/* List of free pages, filled by MmGetReferenceCountPage and
@@ -282,7 +279,6 @@
// This PFN is now a used page, set it up
//
RemoveEntryList(&Pfn1->ListEntry);
- Pfn1->Consumer = MC_NPPOOL;
Pfn1->u3.e2.ReferenceCount = 1;
Pfn1->SavedSwapEntry = 0;
@@ -481,7 +477,6 @@
//
// Allocate it and mark it
//
- Pfn1->Consumer = MC_NPPOOL;
Pfn1->u3.e1.StartOfAllocation = 1;
Pfn1->u3.e1.EndOfAllocation = 1;
Pfn1->u3.e2.ReferenceCount = 1;
@@ -532,7 +527,6 @@
//
// Now setup the page and mark it
//
- Pfn1->Consumer = MC_NPPOOL;
Pfn1->u3.e2.ReferenceCount = 1;
Pfn1->u3.e1.StartOfAllocation = 1;
Pfn1->u3.e1.EndOfAllocation = 1;
@@ -642,43 +636,11 @@
if (!Pfn1) continue;
//
- // Get the consumer
- //
- switch (Pfn1->Consumer)
- {
- case MC_NPPOOL:
-
- Type = "Nonpaged Pool";
- break;
-
- case MC_PPOOL:
-
- Type = "Paged Pool";
- break;
-
- case MC_CACHE:
-
- Type = "File System Cache";
- break;
-
- case MC_USER:
-
- Type = "Process Working Set";
- break;
-
- case MC_SYSTEM:
-
- Type = "System";
- break;
- }
-
- //
// Get the type
//
if (MiIsPfnInUse(Pfn1))
{
State = "Used";
- Totals[Pfn1->Consumer]++;
}
else
{
@@ -720,13 +682,11 @@
ULONG NrSystemPages = 0;
/* Initialize the page lists */
- InitializeListHead(&UserPageListHead);
InitializeListHead(&FreeUnzeroedPageListHead);
InitializeListHead(&FreeZeroedPageListHead);
/* This is what a used page looks like */
RtlZeroMemory(&UsedPage, sizeof(UsedPage));
- UsedPage.Consumer = MC_NPPOOL;
UsedPage.u3.e1.PageLocation = ActiveAndValid;
UsedPage.u3.e2.ReferenceCount = 1;
@@ -784,9 +744,6 @@
/* Finally handle the pages describing the PFN database themselves */
for (i = MxOldFreeDescriptor.BasePage; i < MxFreeDescriptor->BasePage; i++)
{
- /* Ensure this page was not added previously */
- ASSERT(MmPfnDatabase[0][i].Consumer == 0);
-
/* Mark it as used kernel memory */
MmPfnDatabase[0][i] = UsedPage;
NrSystemPages++;
@@ -898,7 +855,6 @@
MiSetConsumer(IN PFN_TYPE Pfn,
IN ULONG Type)
{
- MiGetPfnEntry(Pfn)->Consumer = Type;
MiGetPfnEntry(Pfn)->u3.e1.PageLocation = ActiveAndValid;
}
@@ -966,7 +922,6 @@
PageDescriptor = CONTAINING_RECORD(ListEntry, PHYSICAL_PAGE, ListEntry);
}
- PageDescriptor->Consumer = Type;
PageDescriptor->u3.e2.ReferenceCount = 1;
PageDescriptor->SavedSwapEntry = SwapEntry;