Author: mbosma
Date: Tue Aug 7 10:30:23 2007
New Revision: 28210
URL:
http://svn.reactos.org/svn/reactos?rev=28210&view=rev
Log:
Sorry, reverted wrong rev.
Modified:
branches/cache_manager_rewrite/Instructions.txt
branches/cache_manager_rewrite/cc/copy.c
branches/cache_manager_rewrite/cc/pin.c
branches/cache_manager_rewrite/cc/view.c
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/Instructi…
==============================================================================
--- branches/cache_manager_rewrite/Instructions.txt (original)
+++ branches/cache_manager_rewrite/Instructions.txt Tue Aug 7 10:30:23 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/cc/copy.c
URL:
http://svn.reactos.org/svn/reactos/branches/cache_manager_rewrite/cc/copy.c…
==============================================================================
--- branches/cache_manager_rewrite/cc/copy.c (original)
+++ branches/cache_manager_rewrite/cc/copy.c Tue Aug 7 10:30:23 2007
@@ -203,9 +203,8 @@
{
CurrentLength = Length;
}
- RtlCopyMemory(Buffer,
- (PVOID) ((ULONG_PTR) Bcb->CacheView[Index]->BaseAddress +
Offset.u.LowPart % CACHE_VIEW_SIZE),
- CurrentLength);
+ memcpy (Buffer,
+ (PVOID) ((ULONG_PTR) Bcb->CacheView[Index]->BaseAddress +
Offset.u.LowPart % CACHE_VIEW_SIZE), CurrentLength);
Buffer = (PVOID) ((ULONG_PTR) Buffer + CurrentLength);
Length -= CurrentLength;
Offset.QuadPart += CurrentLength;
@@ -213,7 +212,7 @@
else
{
CurrentLength = Length > CACHE_VIEW_SIZE ? CACHE_VIEW_SIZE : Length;
- RtlCopyMemory(Buffer, Bcb->CacheView[Index]->BaseAddress,
CurrentLength);
+ memcpy (Buffer, Bcb->CacheView[Index]->BaseAddress, CurrentLength);
Buffer = (PVOID) ((ULONG_PTR) Buffer + CurrentLength);
Length -= CurrentLength;
Offset.QuadPart += CurrentLength;
@@ -356,8 +355,8 @@
{
CurrentLength = Length;
}
- RtlCopyMemory((PVOID) ((ULONG_PTR) Bcb->CacheView[Index]->BaseAddress +
Offset.u.LowPart % CACHE_VIEW_SIZE),
- Buffer, CurrentLength);
+ memcpy ((PVOID) ((ULONG_PTR) Bcb->CacheView[Index]->BaseAddress +
Offset.u.LowPart % CACHE_VIEW_SIZE),
+ Buffer, CurrentLength);
Buffer = (PVOID) ((ULONG_PTR) Buffer + CurrentLength);
Length -= CurrentLength;
Offset.QuadPart += CurrentLength;
@@ -365,7 +364,7 @@
else
{
CurrentLength = Length > CACHE_VIEW_SIZE ? CACHE_VIEW_SIZE : Length;
- RtlCopyMemory(Bcb->CacheView[Index]->BaseAddress, Buffer,
CurrentLength);
+ memcpy (Bcb->CacheView[Index]->BaseAddress, Buffer, CurrentLength);
Buffer = (PVOID) ((ULONG_PTR) Buffer + CurrentLength);
Length -= CurrentLength;
Offset.QuadPart += CurrentLength;
@@ -603,15 +602,15 @@
{
CurrentLength = Length;
}
- RtlZeroMemory((PVOID) ((ULONG_PTR)
Bcb->CacheView[Index]->BaseAddress + Offset.u.LowPart % CACHE_VIEW_SIZE),
- CurrentLength);
+ memset ((PVOID) ((ULONG_PTR) Bcb->CacheView[Index]->BaseAddress +
Offset.u.LowPart % CACHE_VIEW_SIZE), 0,
+ CurrentLength);
Length -= CurrentLength;
Offset.QuadPart += CurrentLength;
}
else
{
CurrentLength = Length > CACHE_VIEW_SIZE ? CACHE_VIEW_SIZE : Length;
- RtlZeroMemory(Bcb->CacheView[Index]->BaseAddress, CurrentLength);
+ memset (Bcb->CacheView[Index]->BaseAddress, 0, CurrentLength);
Length -= CurrentLength;
Offset.QuadPart += CurrentLength;
}
Modified: branches/cache_manager_rewrite/cc/pin.c
URL:
http://svn.reactos.org/svn/reactos/branches/cache_manager_rewrite/cc/pin.c?…
==============================================================================
--- branches/cache_manager_rewrite/cc/pin.c (original)
+++ branches/cache_manager_rewrite/cc/pin.c Tue Aug 7 10:30:23 2007
@@ -152,7 +152,7 @@
{
KEBUGCHECK (0);
}
- RtlZeroMemory(iBcb, sizeof (INTERNAL_BCB));
+ memset (iBcb, 0, sizeof (INTERNAL_BCB));
iBcb->Bcb = Bcb;
iBcb->Index = Index;
Modified: branches/cache_manager_rewrite/cc/view.c
URL:
http://svn.reactos.org/svn/reactos/branches/cache_manager_rewrite/cc/view.c…
==============================================================================
--- branches/cache_manager_rewrite/cc/view.c (original)
+++ branches/cache_manager_rewrite/cc/view.c Tue Aug 7 10:30:23 2007
@@ -191,7 +191,7 @@
{
KEBUGCHECK (0);
}
- RtlZeroMemory(Bcb, sizeof (BCB));
+ memset (Bcb, 0, sizeof (BCB));
Bcb->FileObject = FileObject;
Bcb->FileSizes = *FileSizes;
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 Tue Aug 7 10:30:23 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 Tue Aug 7 10:30:23 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 Tue Aug 7 10:30:23 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/sectio…
==============================================================================
--- branches/cache_manager_rewrite/mm/section.c (original)
+++ branches/cache_manager_rewrite/mm/section.c Tue Aug 7 10:30:23 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);