Author: tkreuzer
Date: Mon Mar 29 00:51:39 2010
New Revision: 46532
URL:
http://svn.reactos.org/svn/reactos?rev=46532&view=rev
Log:
[NTOS]
Some freelist.c fixes, to make it compile
Modified:
branches/ros-amd64-bringup/reactos/ntoskrnl/mm/freelist.c
Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/mm/freelist.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
==============================================================================
--- branches/ros-amd64-bringup/reactos/ntoskrnl/mm/freelist.c [iso-8859-1] (original)
+++ branches/ros-amd64-bringup/reactos/ntoskrnl/mm/freelist.c [iso-8859-1] Mon Mar 29
00:51:39 2010
@@ -56,6 +56,7 @@
C_ASSERT(sizeof(PHYSICAL_PAGE) == sizeof(MMPFN));
+#define MiInsertInListTail(x, y) MiInsertInListTail(x, (PMMPFN)y)
//#define MiGetPfnEntry(Pfn) ((PPHYSICAL_PAGE)MiGetPfnEntry(Pfn))
#define MiGetPfnEntryIndex(x) MiGetPfnEntryIndex((struct _MMPFN*)x)
#define LockCount Flags.LockCount
@@ -797,7 +798,7 @@
return;
}
- Page = MiGetPfnEntry(Pfn);
+ Page = (PVOID)MiGetPfnEntry(Pfn);
ASSERT(Page);
Page->u3.e2.ReferenceCount++;
@@ -814,7 +815,7 @@
DPRINT("MmGetReferenceCountPage(PhysicalAddress %x)\n", Pfn <<
PAGE_SHIFT);
oldIrql = KeAcquireQueuedSpinLock(LockQueuePfnLock);
- Page = MiGetPfnEntry(Pfn);
+ Page = (PVOID)MiGetPfnEntry(Pfn);
ASSERT(Page);
RCount = Page->u3.e2.ReferenceCount;
@@ -846,7 +847,7 @@
DPRINT("MmDereferencePage(PhysicalAddress %x)\n", Pfn << PAGE_SHIFT);
- Page = MiGetPfnEntry(Pfn);
+ Page = (PVOID)MiGetPfnEntry(Pfn);
ASSERT(Page);
Page->u3.e2.ReferenceCount--;
@@ -885,13 +886,13 @@
DPRINT1("MmAllocPage(): Out of memory\n");
return 0;
}
- PageDescriptor = MiRemoveHeadList(&MmFreePageListHead);
+ PageDescriptor = (PVOID)MiRemoveHeadList(&MmFreePageListHead);
NeedClear = TRUE;
}
else
{
- PageDescriptor = MiRemoveHeadList(&MmZeroedPageListHead);
+ PageDescriptor = (PVOID)MiRemoveHeadList(&MmZeroedPageListHead);
}
PageDescriptor->u3.e2.ReferenceCount = 1;
@@ -961,7 +962,7 @@
oldIrql = KeAcquireQueuedSpinLock(LockQueuePfnLock);
while (MmFreePageListHead.Total)
{
- PageDescriptor = MiRemoveHeadList(&MmFreePageListHead);
+ PageDescriptor = (PVOID)MiRemoveHeadList(&MmFreePageListHead);
/* We set the page to used, because MmCreateVirtualMapping failed with unused
pages */
KeReleaseQueuedSpinLock(LockQueuePfnLock, oldIrql);
Pfn = PageDescriptor - MmPfnDatabase[0];