The system never considered "ReservedPages" as any different from "SystemPages", other than to spend the accounting time to mark these pages differently. Removed the notion of a reserved pages and count them as system pages instead.

svn path=/trunk/; revision=32367
This commit is contained in:
ReactOS Portable Systems Group 2008-02-14 22:34:50 +00:00
parent 3d1fd7beda
commit 6b9215e607
2 changed files with 10 additions and 11 deletions

View file

@ -252,7 +252,6 @@ typedef struct
{ {
ULONG NrTotalPages; ULONG NrTotalPages;
ULONG NrSystemPages; ULONG NrSystemPages;
ULONG NrReservedPages;
ULONG NrUserPages; ULONG NrUserPages;
ULONG NrFreePages; ULONG NrFreePages;
ULONG NrDirtyPages; ULONG NrDirtyPages;

View file

@ -317,12 +317,12 @@ MmInitializePageList(IN ULONG_PTR FirstPhysKernelAddress,
ULONG Reserved; ULONG Reserved;
NTSTATUS Status; NTSTATUS Status;
PFN_TYPE Pfn = 0; PFN_TYPE Pfn = 0;
ULONG PdeStart = PsGetCurrentProcess()->Pcb.DirectoryTableBase.LowPart;
PHYSICAL_PAGE UsedPage; PHYSICAL_PAGE UsedPage;
extern PMEMORY_ALLOCATION_DESCRIPTOR MiFreeDescriptor;
ULONG PdeStart = PsGetCurrentProcess()->Pcb.DirectoryTableBase.LowPart;
ULONG PdePageStart, PdePageEnd; ULONG PdePageStart, PdePageEnd;
ULONG VideoPageStart, VideoPageEnd; ULONG VideoPageStart, VideoPageEnd;
ULONG KernelPageStart, KernelPageEnd; ULONG KernelPageStart, KernelPageEnd;
extern PMEMORY_ALLOCATION_DESCRIPTOR MiFreeDescriptor;
/* Initialize the page lists */ /* Initialize the page lists */
KeInitializeSpinLock(&PageListLock); KeInitializeSpinLock(&PageListLock);
@ -398,25 +398,25 @@ MmInitializePageList(IN ULONG_PTR FirstPhysKernelAddress,
{ {
/* Page 0 is reserved for the IVT */ /* Page 0 is reserved for the IVT */
MmPageArray[i] = UsedPage; MmPageArray[i] = UsedPage;
MmStats.NrReservedPages++; MmStats.NrSystemPages++;
} }
else if (i == 1) else if (i == 1)
{ {
/* Page 1 is reserved for the PCR */ /* Page 1 is reserved for the PCR */
MmPageArray[i] = UsedPage; MmPageArray[i] = UsedPage;
MmStats.NrReservedPages++; MmStats.NrSystemPages++;
} }
else if (i == 2) else if (i == 2)
{ {
/* Page 2 is reserved for the KUSER_SHARED_DATA */ /* Page 2 is reserved for the KUSER_SHARED_DATA */
MmPageArray[i] = UsedPage; MmPageArray[i] = UsedPage;
MmStats.NrReservedPages++; MmStats.NrSystemPages++;
} }
else if ((i >= PdePageStart) && (i < PdePageEnd)) else if ((i >= PdePageStart) && (i < PdePageEnd))
{ {
/* These pages contain the initial FreeLDR PDEs */ /* These pages contain the initial FreeLDR PDEs */
MmPageArray[i] = UsedPage; MmPageArray[i] = UsedPage;
MmStats.NrReservedPages++; MmStats.NrSystemPages++;
} }
else if ((i >= VideoPageStart) && (i < VideoPageEnd)) else if ((i >= VideoPageStart) && (i < VideoPageEnd))
{ {
@ -428,7 +428,7 @@ MmInitializePageList(IN ULONG_PTR FirstPhysKernelAddress,
*/ */
MmPageArray[i].Flags.Type = MM_PHYSICAL_PAGE_BIOS; MmPageArray[i].Flags.Type = MM_PHYSICAL_PAGE_BIOS;
MmPageArray[i].Flags.Consumer = MC_NPPOOL; MmPageArray[i].Flags.Consumer = MC_NPPOOL;
MmStats.NrReservedPages++; MmStats.NrSystemPages++;
} }
else if ((i >= KernelPageStart) && (i < KernelPageEnd)) else if ((i >= KernelPageStart) && (i < KernelPageEnd))
{ {
@ -462,14 +462,14 @@ MmInitializePageList(IN ULONG_PTR FirstPhysKernelAddress,
/* These are pages reserved by the BIOS/ROMs */ /* These are pages reserved by the BIOS/ROMs */
MmPageArray[i].Flags.Type = MM_PHYSICAL_PAGE_BIOS; MmPageArray[i].Flags.Type = MM_PHYSICAL_PAGE_BIOS;
MmPageArray[i].Flags.Consumer = MC_NPPOOL; MmPageArray[i].Flags.Consumer = MC_NPPOOL;
MmStats.NrReservedPages++; MmStats.NrSystemPages++;
} }
} }
KeInitializeEvent(&ZeroPageThreadEvent, NotificationEvent, TRUE); KeInitializeEvent(&ZeroPageThreadEvent, NotificationEvent, TRUE);
MmStats.NrTotalPages = MmStats.NrFreePages + MmStats.NrSystemPages + MmStats.NrReservedPages + MmStats.NrUserPages; MmStats.NrTotalPages = MmStats.NrFreePages + MmStats.NrSystemPages + MmStats.NrUserPages;
MmInitializeBalancer(MmStats.NrFreePages, MmStats.NrSystemPages + MmStats.NrReservedPages); MmInitializeBalancer(MmStats.NrFreePages, MmStats.NrSystemPages);
return((PVOID)LastKernelAddress); return((PVOID)LastKernelAddress);
} }