Author: mbosma Date: Tue May 2 23:23:43 2006 New Revision: 21775
URL: http://svn.reactos.ru/svn/reactos?rev=21775&view=rev Log: Add a case for cached memory to MmPageOutPhysicalAdress. Please review me !
Modified: branches/cache_manager_rewrite/reactos/ntoskrnl/mm/rmap.c
Modified: branches/cache_manager_rewrite/reactos/ntoskrnl/mm/rmap.c URL: http://svn.reactos.ru/svn/reactos/branches/cache_manager_rewrite/reactos/nto... ============================================================================== --- branches/cache_manager_rewrite/reactos/ntoskrnl/mm/rmap.c (original) +++ branches/cache_manager_rewrite/reactos/ntoskrnl/mm/rmap.c Tue May 2 23:23:43 2006 @@ -299,6 +299,18 @@ */ Status = MmPageOutVirtualMemory(AddressSpace, MemoryArea, Address, PageOp); + } + else if (Type == MEMORY_AREA_CACHE_SEGMENT) + { + /* + * We do not need to write the page to the pagefile if is a + * cache segment: It will be reloaded from the original file + */ + MmDeleteVirtualMapping(AddressSpace->Process, (PVOID)Address, FALSE, NULL, NULL); + MmUnlockAddressSpace(AddressSpace); + while(MmUnsharePage(Page)); + MmDeleteAllRmaps(Page, NULL, NULL); + MmReleasePageMemoryConsumer(MC_CACHE, Page); } else {