mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 06:33:01 +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;
|
MEMORY_AREA* MemoryArea;
|
||||||
ULONG i;
|
ULONG i;
|
||||||
ULONG PhysicalAddr;
|
LARGE_INTEGER PhysicalAddr;
|
||||||
|
|
||||||
DPRINT("MmFreeMemoryArea(AddressSpace %x, BaseAddress %x, Length %x,"
|
DPRINT("MmFreeMemoryArea(AddressSpace %x, BaseAddress %x, Length %x,"
|
||||||
"FreePages %d)\n",AddressSpace,BaseAddress,Length,FreePages);
|
"FreePages %d)\n",AddressSpace,BaseAddress,Length,FreePages);
|
||||||
|
@ -292,12 +292,11 @@ NTSTATUS MmFreeMemoryArea(PMADDRESS_SPACE AddressSpace,
|
||||||
{
|
{
|
||||||
for (i=0;i<=(MemoryArea->Length/PAGESIZE);i++)
|
for (i=0;i<=(MemoryArea->Length/PAGESIZE);i++)
|
||||||
{
|
{
|
||||||
PhysicalAddr = MmGetPhysicalAddressForProcess(AddressSpace->Process,
|
PhysicalAddr = MmGetPhysicalAddress(MemoryArea->BaseAddress +
|
||||||
MemoryArea->BaseAddress +
|
(i*PAGESIZE));
|
||||||
(i*PAGESIZE));
|
if (PhysicalAddr.u.LowPart != 0)
|
||||||
if (PhysicalAddr != 0)
|
|
||||||
{
|
{
|
||||||
MmDereferencePage((PVOID)PhysicalAddr);
|
MmDereferencePage((PVOID)(ULONG)(PhysicalAddr.u.LowPart));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue