From 6579aafa03e8710a55f77073a74f3fb84dbf2ce4 Mon Sep 17 00:00:00 2001 From: Phillip Susi Date: Tue, 23 Jan 2001 04:46:08 +0000 Subject: [PATCH] Undoing last commit, causes kernel to crash on boot. David, any idea why? svn path=/trunk/; revision=1558 --- reactos/ntoskrnl/mm/marea.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/reactos/ntoskrnl/mm/marea.c b/reactos/ntoskrnl/mm/marea.c index 2a78762ea6e..16bfdb270af 100644 --- a/reactos/ntoskrnl/mm/marea.c +++ b/reactos/ntoskrnl/mm/marea.c @@ -276,7 +276,7 @@ NTSTATUS MmFreeMemoryArea(PMADDRESS_SPACE AddressSpace, { MEMORY_AREA* MemoryArea; ULONG i; - ULONG PhysicalAddr; + LARGE_INTEGER PhysicalAddr; DPRINT("MmFreeMemoryArea(AddressSpace %x, BaseAddress %x, Length %x," "FreePages %d)\n",AddressSpace,BaseAddress,Length,FreePages); @@ -292,12 +292,11 @@ NTSTATUS MmFreeMemoryArea(PMADDRESS_SPACE AddressSpace, { for (i=0;i<=(MemoryArea->Length/PAGESIZE);i++) { - PhysicalAddr = MmGetPhysicalAddressForProcess(AddressSpace->Process, - MemoryArea->BaseAddress + - (i*PAGESIZE)); - if (PhysicalAddr != 0) + PhysicalAddr = MmGetPhysicalAddress(MemoryArea->BaseAddress + + (i*PAGESIZE)); + if (PhysicalAddr.u.LowPart != 0) { - MmDereferencePage((PVOID)PhysicalAddr); + MmDereferencePage((PVOID)(ULONG)(PhysicalAddr.u.LowPart)); } } }