Author: mbosma Date: Fri Mar 2 20:01:55 2007 New Revision: 25950
URL: http://svn.reactos.org/svn/reactos?rev=25950&view=rev Log: Merge to state of 0.3.1 branch.
Modified: branches/cache_manager_rewrite/Instructions.txt branches/cache_manager_rewrite/mm/freelist.c branches/cache_manager_rewrite/mm/mminit.c branches/cache_manager_rewrite/mm/rmap.c branches/cache_manager_rewrite/mm/section.c
Modified: branches/cache_manager_rewrite/Instructions.txt URL: http://svn.reactos.org/svn/reactos/branches/cache_manager_rewrite/Instructio... ============================================================================== --- branches/cache_manager_rewrite/Instructions.txt (original) +++ branches/cache_manager_rewrite/Instructions.txt Fri Mar 2 20:01:55 2007 @@ -1,2 +1,2 @@ To build this branch apply the patch to trunk. And replace ntoskrnl/mm, ntoskrnl/cc with the folders from here. -This branch currently applies against: r25313 +This branch currently applies against: 0.3.1 branch - r25940
Modified: branches/cache_manager_rewrite/mm/freelist.c URL: http://svn.reactos.org/svn/reactos/branches/cache_manager_rewrite/mm/freelis... ============================================================================== --- branches/cache_manager_rewrite/mm/freelist.c (original) +++ branches/cache_manager_rewrite/mm/freelist.c Fri Mar 2 20:01:55 2007 @@ -479,7 +479,9 @@ MmPageArray[j].Flags.Type = MM_PHYSICAL_PAGE_USED; MmPageArray[j].Flags.Zero = 0; MmPageArray[j].Flags.Consumer = MC_NPPOOL; - MmPageArray[j].ReferenceCount = 1; + /* Reference count 2, because we're having ReferenceCount track + MapCount as well. */ + MmPageArray[j].ReferenceCount = 2; MmPageArray[j].MapCount = 1; InsertTailList(&UsedPageListHeads[MC_NPPOOL], &MmPageArray[j].ListEntry); @@ -519,7 +521,7 @@ MmPageArray[i].Flags.Type = MM_PHYSICAL_PAGE_USED; MmPageArray[i].Flags.Zero = 0; MmPageArray[i].Flags.Consumer = MC_NPPOOL; - MmPageArray[i].ReferenceCount = 1; + MmPageArray[i].ReferenceCount = 2; MmPageArray[i].MapCount = 1; InsertTailList(&UsedPageListHeads[MC_NPPOOL], &MmPageArray[i].ListEntry); @@ -588,6 +590,7 @@ KEBUGCHECK(0); } MmPageArray[Pfn].MapCount++; + MmPageArray[Pfn].ReferenceCount++; KeReleaseSpinLock(&PageListLock, oldIrql); } } @@ -612,6 +615,7 @@ KEBUGCHECK(0); } MmPageArray[Pfn].MapCount--; + MmPageArray[Pfn].ReferenceCount--; KeReleaseSpinLock(&PageListLock, oldIrql); } }
Modified: branches/cache_manager_rewrite/mm/mminit.c URL: http://svn.reactos.org/svn/reactos/branches/cache_manager_rewrite/mm/mminit.... ============================================================================== --- branches/cache_manager_rewrite/mm/mminit.c (original) +++ branches/cache_manager_rewrite/mm/mminit.c Fri Mar 2 20:01:55 2007 @@ -485,7 +485,7 @@ /* * Initialise the modified page writer. */ - MmInitMpwThread(); + if (!strstr(KeLoaderBlock->LoadOptions, "MININT")) MmInitMpwThread();
/* FIXME: Read parameters from memory */ MmInitSectionImplementation2();
Modified: branches/cache_manager_rewrite/mm/rmap.c URL: http://svn.reactos.org/svn/reactos/branches/cache_manager_rewrite/mm/rmap.c?... ============================================================================== --- branches/cache_manager_rewrite/mm/rmap.c (original) +++ branches/cache_manager_rewrite/mm/rmap.c Fri Mar 2 20:01:55 2007 @@ -415,7 +415,7 @@ if (MmGetPfnForProcess(Process, Address) != Page) { DPRINT1("Insert rmap (%d, 0x%.8X) 0x%.8X which doesn't match physical " - "address 0x%.8X\n", Process ? Process->UniqueProcessId : 0, Address, + "address 0x%.8X\n", Process->UniqueProcessId, Address, MmGetPfnForProcess(Process, Address) << PAGE_SHIFT, Page << PAGE_SHIFT); KEBUGCHECK(0); @@ -492,7 +492,7 @@ } if (Process) { - InterlockedExchangeAddUL(&Process->Vm.WorkingSetSize, -PAGE_SIZE); + (void)InterlockedExchangeAddUL(&Process->Vm.WorkingSetSize, -PAGE_SIZE); } } }
Modified: branches/cache_manager_rewrite/mm/section.c URL: http://svn.reactos.org/svn/reactos/branches/cache_manager_rewrite/mm/section... ============================================================================== --- branches/cache_manager_rewrite/mm/section.c (original) +++ branches/cache_manager_rewrite/mm/section.c Fri Mar 2 20:01:55 2007 @@ -3281,6 +3281,7 @@ ObjectTypeInitializer.GenericMapping = MmpSectionMapping; ObjectTypeInitializer.DeleteProcedure = MmpDeleteSection; ObjectTypeInitializer.CloseProcedure = MmpCloseSection; + ObjectTypeInitializer.ValidAccessMask = SECTION_ALL_ACCESS; ObCreateObjectType(&Name, &ObjectTypeInitializer, NULL, &MmSectionObjectType);
InitializeListHead(&ImageSectionObjectListHead);