diff --git a/reactos/ntoskrnl/include/internal/mm.h b/reactos/ntoskrnl/include/internal/mm.h index 04bbcaca2fe..c67b0870ea9 100644 --- a/reactos/ntoskrnl/include/internal/mm.h +++ b/reactos/ntoskrnl/include/internal/mm.h @@ -1339,8 +1339,7 @@ MmSetDirtyPage( PFN_TYPE NTAPI MmAllocPage( - ULONG Consumer, - SWAPENTRY SavedSwapEntry + ULONG Consumer ); LONG diff --git a/reactos/ntoskrnl/mm/ARM3/i386/init.c b/reactos/ntoskrnl/mm/ARM3/i386/init.c index 722b1e612e6..bdbda30fbbe 100644 --- a/reactos/ntoskrnl/mm/ARM3/i386/init.c +++ b/reactos/ntoskrnl/mm/ARM3/i386/init.c @@ -547,7 +547,7 @@ MiInitMachineDependent(IN PLOADER_PARAMETER_BLOCK LoaderBlock) // // Allocate a page for it and create it // - PageFrameIndex = MmAllocPage(MC_SYSTEM, 0); + PageFrameIndex = MmAllocPage(MC_SYSTEM); TempPde.u.Hard.PageFrameNumber = PageFrameIndex; TempPde.u.Hard.Global = FALSE; // Hyperspace is local! ASSERT(StartPde->u.Hard.Valid == 0); diff --git a/reactos/ntoskrnl/mm/ARM3/mminit.c b/reactos/ntoskrnl/mm/ARM3/mminit.c index 5b5831e8786..0609961afe6 100644 --- a/reactos/ntoskrnl/mm/ARM3/mminit.c +++ b/reactos/ntoskrnl/mm/ARM3/mminit.c @@ -1251,7 +1251,7 @@ MiBuildPagedPool(VOID) // // Allocate a page and map the first paged pool PDE // - PageFrameIndex = MmAllocPage(MC_NPPOOL, 0); + PageFrameIndex = MmAllocPage(MC_NPPOOL); TempPte.u.Hard.PageFrameNumber = PageFrameIndex; ASSERT(PointerPde->u.Hard.Valid == 0); ASSERT(TempPte.u.Hard.Valid == 1); diff --git a/reactos/ntoskrnl/mm/ARM3/pagfault.c b/reactos/ntoskrnl/mm/ARM3/pagfault.c index f1422f88079..dbed3005446 100644 --- a/reactos/ntoskrnl/mm/ARM3/pagfault.c +++ b/reactos/ntoskrnl/mm/ARM3/pagfault.c @@ -97,7 +97,7 @@ MiResolveDemandZeroFault(IN PVOID Address, // // Get a page // - PageFrameNumber = MmAllocPage(MC_PPOOL, 0); + PageFrameNumber = MmAllocPage(MC_PPOOL); DPRINT("New pool page: %lx\n", PageFrameNumber); // diff --git a/reactos/ntoskrnl/mm/ARM3/pool.c b/reactos/ntoskrnl/mm/ARM3/pool.c index 0d341a8a58f..111180c9f13 100644 --- a/reactos/ntoskrnl/mm/ARM3/pool.c +++ b/reactos/ntoskrnl/mm/ARM3/pool.c @@ -236,7 +236,7 @@ MiAllocatePoolPages(IN POOL_TYPE PoolType, // // Request a paged pool page and write the PFN for it // - PageFrameNumber = MmAllocPage(MC_PPOOL, 0); + PageFrameNumber = MmAllocPage(MC_PPOOL); TempPte.u.Hard.PageFrameNumber = PageFrameNumber; // @@ -499,7 +499,7 @@ MiAllocatePoolPages(IN POOL_TYPE PoolType, // // Allocate a page // - PageFrameNumber = MmAllocPage(MC_NPPOOL, 0); + PageFrameNumber = MmAllocPage(MC_NPPOOL); // // Get the PFN entry for it diff --git a/reactos/ntoskrnl/mm/ARM3/procsup.c b/reactos/ntoskrnl/mm/ARM3/procsup.c index a2f215a2065..e12ad48fe59 100644 --- a/reactos/ntoskrnl/mm/ARM3/procsup.c +++ b/reactos/ntoskrnl/mm/ARM3/procsup.c @@ -158,7 +158,7 @@ MmCreateKernelStack(IN BOOLEAN GuiStack, // // Get a page // - PageFrameIndex = MmAllocPage(MC_NPPOOL, 0); + PageFrameIndex = MmAllocPage(MC_NPPOOL); TempPte.u.Hard.PageFrameNumber = PageFrameIndex; // @@ -257,7 +257,7 @@ MmGrowKernelStackEx(IN PVOID StackPointer, // // Get a page // - PageFrameIndex = MmAllocPage(MC_NPPOOL, 0); + PageFrameIndex = MmAllocPage(MC_NPPOOL); TempPte.u.Hard.PageFrameNumber = PageFrameIndex; // diff --git a/reactos/ntoskrnl/mm/balance.c b/reactos/ntoskrnl/mm/balance.c index f70d80b44cf..cc7b59d1472 100644 --- a/reactos/ntoskrnl/mm/balance.c +++ b/reactos/ntoskrnl/mm/balance.c @@ -260,7 +260,7 @@ MmRequestPageMemoryConsumer(ULONG Consumer, BOOLEAN CanWait, if ((Consumer == MC_NPPOOL) || (Consumer == MC_SYSTEM) || MiIsBalancerThread()) { OldIrql = KeAcquireQueuedSpinLock(LockQueuePfnLock); - Page = MmAllocPage(Consumer, 0); + Page = MmAllocPage(Consumer); KeReleaseQueuedSpinLock(LockQueuePfnLock, OldIrql); if (Page == 0) { @@ -326,7 +326,7 @@ MmRequestPageMemoryConsumer(ULONG Consumer, BOOLEAN CanWait, * Actually allocate the page. */ OldIrql = KeAcquireQueuedSpinLock(LockQueuePfnLock); - Page = MmAllocPage(Consumer, 0); + Page = MmAllocPage(Consumer); KeReleaseQueuedSpinLock(LockQueuePfnLock, OldIrql); if (Page == 0) { diff --git a/reactos/ntoskrnl/mm/freelist.c b/reactos/ntoskrnl/mm/freelist.c index 6175fad7a11..38c708f6d10 100644 --- a/reactos/ntoskrnl/mm/freelist.c +++ b/reactos/ntoskrnl/mm/freelist.c @@ -30,7 +30,6 @@ // REACTOS NT // #define RmapListHead AweReferenceCount -#define SavedSwapEntry u4.EntireFrame #define PHYSICAL_PAGE MMPFN #define PPHYSICAL_PAGE PMMPFN @@ -255,7 +254,6 @@ MiFindContiguousPages(IN PFN_NUMBER LowestPfn, // MiRemoveFromList(Pfn1); Pfn1->u3.e2.ReferenceCount = 1; - Pfn1->SavedSwapEntry = 0; // // Check if it was already zeroed @@ -448,7 +446,6 @@ MiAllocatePagesForMdl(IN PHYSICAL_ADDRESS LowAddress, Pfn1->u3.e1.StartOfAllocation = 1; Pfn1->u3.e1.EndOfAllocation = 1; Pfn1->u3.e2.ReferenceCount = 1; - Pfn1->SavedSwapEntry = 0; // // Decrease available pages @@ -497,7 +494,6 @@ MiAllocatePagesForMdl(IN PHYSICAL_ADDRESS LowAddress, Pfn1->u3.e2.ReferenceCount = 1; Pfn1->u3.e1.StartOfAllocation = 1; Pfn1->u3.e1.EndOfAllocation = 1; - Pfn1->SavedSwapEntry = 0; // // Decrease available pages @@ -747,7 +743,7 @@ MmSetSavedSwapEntryPage(PFN_TYPE Pfn, SWAPENTRY SwapEntry) KIRQL oldIrql; oldIrql = KeAcquireQueuedSpinLock(LockQueuePfnLock); - MiGetPfnEntry(Pfn)->SavedSwapEntry = SwapEntry; + MiGetPfnEntry(Pfn)->u1.WsIndex = SwapEntry; KeReleaseQueuedSpinLock(LockQueuePfnLock, oldIrql); } @@ -759,7 +755,7 @@ MmGetSavedSwapEntryPage(PFN_TYPE Pfn) KIRQL oldIrql; oldIrql = KeAcquireQueuedSpinLock(LockQueuePfnLock); - SwapEntry = MiGetPfnEntry(Pfn)->SavedSwapEntry; + SwapEntry = MiGetPfnEntry(Pfn)->u1.WsIndex; KeReleaseQueuedSpinLock(LockQueuePfnLock, oldIrql); return(SwapEntry); @@ -845,7 +841,7 @@ MmDereferencePage(PFN_TYPE Pfn) PFN_TYPE NTAPI -MmAllocPage(ULONG Type, SWAPENTRY SwapEntry) +MmAllocPage(ULONG Type) { PFN_TYPE PfnOffset; PPHYSICAL_PAGE PageDescriptor; @@ -876,7 +872,6 @@ MmAllocPage(ULONG Type, SWAPENTRY SwapEntry) } PageDescriptor->u3.e2.ReferenceCount = 1; - PageDescriptor->SavedSwapEntry = SwapEntry; MmAvailablePages--;