mirror of
https://github.com/reactos/reactos.git
synced 2024-11-20 06:15:26 +00:00
Undoing last commit, causes kernel to crash on boot. David, any idea why?
svn path=/trunk/; revision=1558
This commit is contained in:
parent
b6593ffc1b
commit
6579aafa03
1 changed files with 5 additions and 6 deletions
|
@ -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));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue