From 8e68ec6bf26a856e73dd6b927b44a6755614ff8c Mon Sep 17 00:00:00 2001 From: Hartmut Birr Date: Sat, 17 May 2003 13:42:56 +0000 Subject: [PATCH] - Marked the initial kernel space as mapped. svn path=/trunk/; revision=4698 --- reactos/ntoskrnl/mm/freelist.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/reactos/ntoskrnl/mm/freelist.c b/reactos/ntoskrnl/mm/freelist.c index 5a037f4038e..4a017592b79 100644 --- a/reactos/ntoskrnl/mm/freelist.c +++ b/reactos/ntoskrnl/mm/freelist.c @@ -363,7 +363,7 @@ MmInitializePageList(PVOID FirstPhysKernelAddress, i = 2; if ((ULONG)FirstPhysKernelAddress < 0xa0000) { - MmStats.NrFreePages += (((ULONG)FirstPhysKernelAddress/PAGE_SIZE) - 1); + MmStats.NrFreePages += (((ULONG)FirstPhysKernelAddress/PAGE_SIZE) - 2); for (; i<((ULONG)FirstPhysKernelAddress/PAGE_SIZE); i++) { MmPageArray[i].Flags = MM_PHYSICAL_PAGE_FREE; @@ -377,6 +377,7 @@ MmInitializePageList(PVOID FirstPhysKernelAddress, { MmPageArray[i].Flags = MM_PHYSICAL_PAGE_USED; MmPageArray[i].ReferenceCount = 1; + MmPageArray[i].MapCount = 1; InsertTailList(&UsedPageListHeads[MC_NPPOOL], &MmPageArray[i].ListEntry); } @@ -399,7 +400,7 @@ MmInitializePageList(PVOID FirstPhysKernelAddress, } else { - MmStats.NrFreePages += ((0xa0000 / PAGE_SIZE) - 1); + MmStats.NrFreePages += ((0xa0000 / PAGE_SIZE) - 2); for (; i<(0xa0000 / PAGE_SIZE); i++) { MmPageArray[i].Flags = MM_PHYSICAL_PAGE_FREE; @@ -429,6 +430,7 @@ MmInitializePageList(PVOID FirstPhysKernelAddress, { MmPageArray[i].Flags = MM_PHYSICAL_PAGE_USED; MmPageArray[i].ReferenceCount = 1; + MmPageArray[i].MapCount = 1; InsertTailList(&UsedPageListHeads[MC_NPPOOL], &MmPageArray[i].ListEntry); }