svn path=/trunk/; revision=1714
This commit is contained in:
David Welch 2001-03-18 20:30:22 +00:00
parent f8ad495ac2
commit ffca6e4a0a

View file

@ -549,17 +549,20 @@ MmAllocPage(SWAPENTRY SavedSwapEntry)
ULONG offset;
PLIST_ENTRY ListEntry;
PPHYSICAL_PAGE PageDescriptor;
KIRQL oldIrql;
DPRINT("MmAllocPage()\n");
ListEntry = ExInterlockedRemoveTailList(&FreePageListHead,
&PageListLock);
DPRINT("ListEntry %x\n",ListEntry);
if (ListEntry == NULL)
KeAcquireSpinLock(&PageListLock, &oldIrql);
if (IsListEmpty(&FreePageListHead))
{
DPRINT("MmAllocPage(): Out of memory\n");
KeReleaseSpinLock(&PageListLock, oldIrql);
return(NULL);
}
ListEntry = RemoveTailList(&FreePageListHead);
KeReleaseSpinLock(&PageListLock, oldIrql);
PageDescriptor = CONTAINING_RECORD(ListEntry, PHYSICAL_PAGE, ListEntry);
DPRINT("PageDescriptor %x\n",PageDescriptor);
if (PageDescriptor->Flags != MM_PHYSICAL_PAGE_FREE)