Author: ros-arm-bringup
Date: Fri Feb 15 01:34:50 2008
New Revision: 32367
URL:
http://svn.reactos.org/svn/reactos?rev=32367&view=rev
Log:
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.
Modified:
trunk/reactos/ntoskrnl/include/internal/mm.h
trunk/reactos/ntoskrnl/mm/freelist.c
Modified: trunk/reactos/ntoskrnl/include/internal/mm.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/…
==============================================================================
--- trunk/reactos/ntoskrnl/include/internal/mm.h (original)
+++ trunk/reactos/ntoskrnl/include/internal/mm.h Fri Feb 15 01:34:50 2008
@@ -252,7 +252,6 @@
{
ULONG NrTotalPages;
ULONG NrSystemPages;
- ULONG NrReservedPages;
ULONG NrUserPages;
ULONG NrFreePages;
ULONG NrDirtyPages;
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 (original)
+++ trunk/reactos/ntoskrnl/mm/freelist.c Fri Feb 15 01:34:50 2008
@@ -317,12 +317,12 @@
ULONG Reserved;
NTSTATUS Status;
PFN_TYPE Pfn = 0;
+ PHYSICAL_PAGE UsedPage;
+ extern PMEMORY_ALLOCATION_DESCRIPTOR MiFreeDescriptor;
ULONG PdeStart = PsGetCurrentProcess()->Pcb.DirectoryTableBase.LowPart;
- PHYSICAL_PAGE UsedPage;
ULONG PdePageStart, PdePageEnd;
ULONG VideoPageStart, VideoPageEnd;
ULONG KernelPageStart, KernelPageEnd;
- extern PMEMORY_ALLOCATION_DESCRIPTOR MiFreeDescriptor;
/* Initialize the page lists */
KeInitializeSpinLock(&PageListLock);
@@ -398,25 +398,25 @@
{
/* Page 0 is reserved for the IVT */
MmPageArray[i] = UsedPage;
- MmStats.NrReservedPages++;
+ MmStats.NrSystemPages++;
}
else if (i == 1)
{
/* Page 1 is reserved for the PCR */
MmPageArray[i] = UsedPage;
- MmStats.NrReservedPages++;
+ MmStats.NrSystemPages++;
}
else if (i == 2)
{
/* Page 2 is reserved for the KUSER_SHARED_DATA */
MmPageArray[i] = UsedPage;
- MmStats.NrReservedPages++;
+ MmStats.NrSystemPages++;
}
else if ((i >= PdePageStart) && (i < PdePageEnd))
{
/* These pages contain the initial FreeLDR PDEs */
MmPageArray[i] = UsedPage;
- MmStats.NrReservedPages++;
+ MmStats.NrSystemPages++;
}
else if ((i >= VideoPageStart) && (i < VideoPageEnd))
{
@@ -428,7 +428,7 @@
*/
MmPageArray[i].Flags.Type = MM_PHYSICAL_PAGE_BIOS;
MmPageArray[i].Flags.Consumer = MC_NPPOOL;
- MmStats.NrReservedPages++;
+ MmStats.NrSystemPages++;
}
else if ((i >= KernelPageStart) && (i < KernelPageEnd))
{
@@ -462,14 +462,14 @@
/* These are pages reserved by the BIOS/ROMs */
MmPageArray[i].Flags.Type = MM_PHYSICAL_PAGE_BIOS;
MmPageArray[i].Flags.Consumer = MC_NPPOOL;
- MmStats.NrReservedPages++;
+ MmStats.NrSystemPages++;
}
}
KeInitializeEvent(&ZeroPageThreadEvent, NotificationEvent, TRUE);
- MmStats.NrTotalPages = MmStats.NrFreePages + MmStats.NrSystemPages +
MmStats.NrReservedPages + MmStats.NrUserPages;
- MmInitializeBalancer(MmStats.NrFreePages, MmStats.NrSystemPages +
MmStats.NrReservedPages);
+ MmStats.NrTotalPages = MmStats.NrFreePages + MmStats.NrSystemPages +
MmStats.NrUserPages;
+ MmInitializeBalancer(MmStats.NrFreePages, MmStats.NrSystemPages);
return((PVOID)LastKernelAddress);
}