/* INCLUDES *****************************************************************/
#include <ntoskrnl.h>
+#ifdef NEWCC
#include "../cache/section/newmm.h"
+#endif
#define NDEBUG
#include <debug.h>
ULONG Offset;
NTSTATUS Status = STATUS_SUCCESS;
- ASSERT(FALSE);
-
ExAcquireFastMutex(&RmapListLock);
entry = MmGetRmapListHeadPage(Page);
if (entry == NULL)
}
while (current_entry != NULL)
{
+#ifdef NEWCC
if (!RMAP_IS_SEGMENT(current_entry->Address))
+#endif
MmSetCleanPage(current_entry->Process, current_entry->Address);
current_entry = current_entry->Next;
}
}
while (current_entry != NULL)
{
+#ifdef NEWCC
if (!RMAP_IS_SEGMENT(current_entry->Address))
+#endif
MmSetDirtyPage(current_entry->Process, current_entry->Address);
current_entry = current_entry->Next;
}
}
while (current_entry != NULL)
{
- if (!RMAP_IS_SEGMENT(current_entry->Address) &&
+ if (
+#ifdef NEWCC
+ !RMAP_IS_SEGMENT(current_entry->Address) &&
+#endif
MmIsDirtyPage(current_entry->Process, current_entry->Address))
{
ExReleaseFastMutex(&RmapListLock);
PMM_RMAP_ENTRY current_entry;
PMM_RMAP_ENTRY new_entry;
ULONG PrevSize;
-
+#ifdef NEWCC
if (!RMAP_IS_SEGMENT(Address))
+#endif
Address = (PVOID)PAGE_ROUND_DOWN(Address);
new_entry = ExAllocateFromNPagedLookasideList(&RmapLookasideList);
#endif
#endif
- if (!RMAP_IS_SEGMENT(Address) &&
+ if (
+#ifdef NEWCC
+ !RMAP_IS_SEGMENT(Address) &&
+#endif
MmGetPfnForProcess(Process, Address) != Page)
{
DPRINT1("Insert rmap (%d, 0x%.8X) 0x%.8X which doesn't match physical "
#endif
MmSetRmapListHeadPage(Page, new_entry);
ExReleaseFastMutex(&RmapListLock);
-
+#ifdef NEWCC
if (!RMAP_IS_SEGMENT(Address))
+#endif
{
if (Process == NULL)
{
{
previous_entry = current_entry;
current_entry = current_entry->Next;
+#ifdef NEWCC
if (!RMAP_IS_SEGMENT(current_entry->Address))
+#endif
{
if (DeleteMapping)
{
(void)InterlockedExchangeAddUL(&Process->Vm.WorkingSetSize, -PAGE_SIZE);
}
}
+#ifdef NEWCC
else
{
ExFreeToNPagedLookasideList(&RmapLookasideList, previous_entry);
}
+#endif
}
}
}
ExReleaseFastMutex(&RmapListLock);
ExFreeToNPagedLookasideList(&RmapLookasideList, current_entry);
- if (!RMAP_IS_SEGMENT(Address)) {
+#ifdef NEWCC
+ if (!RMAP_IS_SEGMENT(Address))
+#endif
+ {
if (Process == NULL)
{
Process = PsInitialSystemProcess;
KeBugCheck(MEMORY_MANAGEMENT);
}
+#ifdef NEWCC
PVOID
NTAPI
MmGetSegmentRmap(PFN_NUMBER Page, PULONG RawOffset)
}
ExReleaseFastMutex(&RmapListLock);
}
+#endif