Home | Info | Community | Development | myReactOS | Contact Us
Definition at line 749 of file data.c.
Referenced by MmUnmapViewOfCacheSegment().
{ ULONG_PTR Entry; PVOID *ContextData = Context; PMMSUPPORT AddressSpace; PEPROCESS Process; PMM_SECTION_SEGMENT Segment; LARGE_INTEGER Offset; DPRINT("MmFreeSectionPage(%x,%x,%x,%x,%d)\n", MmGetAddressSpaceOwner(ContextData[0]), Address, Page, SwapEntry, Dirty); AddressSpace = ContextData[0]; Process = MmGetAddressSpaceOwner(AddressSpace); Address = (PVOID)PAGE_ROUND_DOWN(Address); Segment = ContextData[1]; Offset.QuadPart = (ULONG_PTR)Address - (ULONG_PTR)MemoryArea->StartingAddress + MemoryArea->Data.SectionData.ViewOffset.QuadPart; Entry = MmGetPageEntrySectionSegment(Segment, &Offset); if (Page != 0 && PFN_FROM_SSE(Entry) == Page && Dirty) { DPRINT("Freeing section page %x:%x -> %x\n", Segment, Offset.LowPart, Entry); MmSetPageEntrySectionSegment(Segment, &Offset, DIRTY_SSE(Entry)); } if (Page) { DPRINT("Removing page %x:%x -> %x\n", Segment, Offset.LowPart, Entry); MmSetSavedSwapEntryPage(Page, 0); MmDeleteRmap(Page, Process, Address); MmDeleteVirtualMapping(Process, Address, FALSE, NULL, NULL); MmReleasePageMemoryConsumer(MC_CACHE, Page); } if (SwapEntry != 0) { MmFreeSwapPage(SwapEntry); } }