MmDeleteVirtualMapping(AddressSpace->Process, Address, FALSE, NULL, NULL);
MmDeleteAllRmaps(Page, NULL, NULL);
if ((SwapEntry = MmGetSavedSwapEntryPage(Page)) != 0)
MmDeleteVirtualMapping(AddressSpace->Process, Address, FALSE, NULL, NULL);
MmDeleteAllRmaps(Page, NULL, NULL);
if ((SwapEntry = MmGetSavedSwapEntryPage(Page)) != 0)
MmCreatePageFileMapping(AddressSpace->Process, Address, SwapEntry);
MmSetSavedSwapEntryPage(Page, 0);
}
MmCreatePageFileMapping(AddressSpace->Process, Address, SwapEntry);
MmSetSavedSwapEntryPage(Page, 0);
}
MmReleasePageMemoryConsumer(MC_USER, Page);
PageOp->Status = STATUS_SUCCESS;
KeSetEvent(&PageOp->CompletionEvent, IO_NO_INCREMENT, FALSE);
MmReleasePageMemoryConsumer(MC_USER, Page);
PageOp->Status = STATUS_SUCCESS;
KeSetEvent(&PageOp->CompletionEvent, IO_NO_INCREMENT, FALSE);
* Otherwise we have succeeded, free the page
*/
DPRINT("MM: Swapped out virtual memory page 0x%.8X!\n", Page << PAGE_SHIFT);
* Otherwise we have succeeded, free the page
*/
DPRINT("MM: Swapped out virtual memory page 0x%.8X!\n", Page << PAGE_SHIFT);
MmDeleteVirtualMapping(AddressSpace->Process, Address, FALSE, NULL, NULL);
MmCreatePageFileMapping(AddressSpace->Process, Address, SwapEntry);
MmDeleteVirtualMapping(AddressSpace->Process, Address, FALSE, NULL, NULL);
MmCreatePageFileMapping(AddressSpace->Process, Address, SwapEntry);
MmDeleteAllRmaps(Page, NULL, NULL);
MmSetSavedSwapEntryPage(Page, 0);
MmReleasePageMemoryConsumer(MC_USER, Page);
MmDeleteAllRmaps(Page, NULL, NULL);
MmSetSavedSwapEntryPage(Page, 0);
MmReleasePageMemoryConsumer(MC_USER, Page);
MemoryAreaLength, Type, Protect);
if ((AllocationType & MEM_COMMIT) &&
MemoryAreaLength, Type, Protect);
if ((AllocationType & MEM_COMMIT) &&
MmFreeSwapPage(SavedSwapEntry);
MmSetSavedSwapEntryPage(Page, 0);
}
MmFreeSwapPage(SavedSwapEntry);
MmSetSavedSwapEntryPage(Page, 0);
}
- Info->AllocationProtect = MemoryArea->Attributes;
- Info->RegionSize = (char*)RegionBase + Region->Length - (char*)Info->BaseAddress;
+ Info->AllocationProtect = MemoryArea->Protect;
+ Info->RegionSize = Region->Length;
Info->State = Region->Type;
Info->Protect = Region->Protect;
Info->Type = MEM_PRIVATE;
Info->State = Region->Type;
Info->Protect = Region->Protect;
Info->Type = MEM_PRIVATE;