Undoing last commit, causes kernel to crash on boot. David, any idea why?

svn path=/trunk/; revision=1558
This commit is contained in:
Phillip Susi 2001-01-23 04:46:08 +00:00
parent b6593ffc1b
commit 6579aafa03

View file

@ -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));
}
}
}