Author: mbosma
Date: Sun Aug 5 00:23:18 2007
New Revision: 28163
URL:
http://svn.reactos.org/svn/reactos?rev=28163&view=rev
Log:
Reverted changes from r25949 and r25951 on request from author.
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/pageop.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/Instructi…
==============================================================================
--- branches/cache_manager_rewrite/Instructions.txt (original)
+++ branches/cache_manager_rewrite/Instructions.txt Sun Aug 5 00:23:18 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: 0.3.1 branch - r25940
+This branch currently applies against: r25313
Modified: branches/cache_manager_rewrite/mm/freelist.c
URL:
http://svn.reactos.org/svn/reactos/branches/cache_manager_rewrite/mm/freeli…
==============================================================================
--- branches/cache_manager_rewrite/mm/freelist.c (original)
+++ branches/cache_manager_rewrite/mm/freelist.c Sun Aug 5 00:23:18 2007
@@ -479,9 +479,7 @@
MmPageArray[j].Flags.Type = MM_PHYSICAL_PAGE_USED;
MmPageArray[j].Flags.Zero = 0;
MmPageArray[j].Flags.Consumer = MC_NPPOOL;
- /* Reference count 2, because we're having ReferenceCount track
- MapCount as well. */
- MmPageArray[j].ReferenceCount = 2;
+ MmPageArray[j].ReferenceCount = 1;
MmPageArray[j].MapCount = 1;
InsertTailList(&UsedPageListHeads[MC_NPPOOL],
&MmPageArray[j].ListEntry);
@@ -521,7 +519,7 @@
MmPageArray[i].Flags.Type = MM_PHYSICAL_PAGE_USED;
MmPageArray[i].Flags.Zero = 0;
MmPageArray[i].Flags.Consumer = MC_NPPOOL;
- MmPageArray[i].ReferenceCount = 2;
+ MmPageArray[i].ReferenceCount = 1;
MmPageArray[i].MapCount = 1;
InsertTailList(&UsedPageListHeads[MC_NPPOOL],
&MmPageArray[i].ListEntry);
@@ -590,7 +588,6 @@
KEBUGCHECK(0);
}
MmPageArray[Pfn].MapCount++;
- MmPageArray[Pfn].ReferenceCount++;
KeReleaseSpinLock(&PageListLock, oldIrql);
}
}
@@ -615,7 +612,6 @@
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 Sun Aug 5 00:23:18 2007
@@ -485,7 +485,7 @@
/*
* Initialise the modified page writer.
*/
- if (!strstr(KeLoaderBlock->LoadOptions, "MININT")) MmInitMpwThread();
+ MmInitMpwThread();
/* FIXME: Read parameters from memory */
MmInitSectionImplementation2();
Modified: branches/cache_manager_rewrite/mm/pageop.c
URL:
http://svn.reactos.org/svn/reactos/branches/cache_manager_rewrite/mm/pageop…
==============================================================================
--- branches/cache_manager_rewrite/mm/pageop.c (original)
+++ branches/cache_manager_rewrite/mm/pageop.c Sun Aug 5 00:23:18 2007
@@ -48,7 +48,7 @@
}
if (PageOp->MArea)
{
- (void)InterlockedDecrementUL(&PageOp->MArea->PageOpCount);
+ InterlockedDecrementUL(&PageOp->MArea->PageOpCount);
}
PrevPageOp = MmPageOpHashTable[PageOp->Hash];
if (PrevPageOp == PageOp)
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 Sun Aug 5 00:23:18 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->UniqueProcessId, Address,
+ "address 0x%.8X\n", Process ? Process->UniqueProcessId : 0, Address,
MmGetPfnForProcess(Process, Address) << PAGE_SHIFT,
Page << PAGE_SHIFT);
KEBUGCHECK(0);
@@ -492,7 +492,7 @@
}
if (Process)
{
- (void)InterlockedExchangeAddUL(&Process->Vm.WorkingSetSize, -PAGE_SIZE);
+ InterlockedExchangeAddUL(&Process->Vm.WorkingSetSize, -PAGE_SIZE);
}
}
}
@@ -528,7 +528,7 @@
}
if (Process)
{
- (void)InterlockedExchangeAddUL(&Process->Vm.WorkingSetSize,
-PAGE_SIZE);
+ InterlockedExchangeAddUL(&Process->Vm.WorkingSetSize, -PAGE_SIZE);
}
return;
}
Modified: branches/cache_manager_rewrite/mm/section.c
URL:
http://svn.reactos.org/svn/reactos/branches/cache_manager_rewrite/mm/sectio…
==============================================================================
--- branches/cache_manager_rewrite/mm/section.c (original)
+++ branches/cache_manager_rewrite/mm/section.c Sun Aug 5 00:23:18 2007
@@ -3281,7 +3281,6 @@
ObjectTypeInitializer.GenericMapping = MmpSectionMapping;
ObjectTypeInitializer.DeleteProcedure = MmpDeleteSection;
ObjectTypeInitializer.CloseProcedure = MmpCloseSection;
- ObjectTypeInitializer.ValidAccessMask = SECTION_ALL_ACCESS;
ObCreateObjectType(&Name, &ObjectTypeInitializer, NULL,
&MmSectionObjectType);
InitializeListHead(&ImageSectionObjectListHead);