Fix bug in memory mapping which caused large applications to BSOD the system. Abiword...
authorAlex Ionescu <aionescu@gmail.com>
Tue, 17 May 2005 18:04:23 +0000 (18:04 +0000)
committerAlex Ionescu <aionescu@gmail.com>
Tue, 17 May 2005 18:04:23 +0000 (18:04 +0000)
svn path=/trunk/; revision=15380

reactos/ntoskrnl/mm/rmap.c

index d12dfaa..8223714 100644 (file)
@@ -142,7 +142,7 @@ MmWritePagePhysicalAddress(PFN_TYPE Page)
       Status = MmWritePageSectionView(AddressSpace, MemoryArea,
                                       Address, PageOp);
    }
-   else if (Type == MEMORY_AREA_VIRTUAL_MEMORY)
+   else if ((Type == MEMORY_AREA_VIRTUAL_MEMORY) || (Type == MEMORY_AREA_PEB_OR_TEB))
    {
       PageOp = MmGetPageOp(MemoryArea, Address < (PVOID)KERNEL_BASE ? Process->UniqueProcessId : NULL,
                            Address, NULL, 0, MM_PAGEOP_PAGEOUT, TRUE);
@@ -265,7 +265,7 @@ MmPageOutPhysicalAddress(PFN_TYPE Page)
       Status = MmPageOutSectionView(AddressSpace, MemoryArea,
                                     Address, PageOp);
    }
-   else if (Type == MEMORY_AREA_VIRTUAL_MEMORY)
+   else if ((Type == MEMORY_AREA_VIRTUAL_MEMORY) || (Type == MEMORY_AREA_PEB_OR_TEB))
    {
       PageOp = MmGetPageOp(MemoryArea, Address < (PVOID)KERNEL_BASE ? Process->UniqueProcessId : NULL,
                            Address, NULL, 0, MM_PAGEOP_PAGEOUT, TRUE);