mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 13:26:17 +00:00
[NTOS]
Some freelist.c fixes, to make it compile svn path=/branches/ros-amd64-bringup/; revision=46532
This commit is contained in:
parent
7aab8a308b
commit
6f805c852b
1 changed files with 7 additions and 6 deletions
|
@ -56,6 +56,7 @@ typedef union
|
|||
|
||||
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 @@ MmReferencePage(PFN_NUMBER Pfn)
|
|||
return;
|
||||
}
|
||||
|
||||
Page = MiGetPfnEntry(Pfn);
|
||||
Page = (PVOID)MiGetPfnEntry(Pfn);
|
||||
ASSERT(Page);
|
||||
|
||||
Page->u3.e2.ReferenceCount++;
|
||||
|
@ -814,7 +815,7 @@ MmGetReferenceCountPage(PFN_NUMBER Pfn)
|
|||
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 @@ MmDereferencePage(PFN_NUMBER Pfn)
|
|||
|
||||
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 @@ MmAllocPage(ULONG Type)
|
|||
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 @@ MmZeroPageThreadMain(PVOID Ignored)
|
|||
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];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue