- Change more ASSERT(FALSE) to KeBugCheck(MEMORY_MANAGEMENT) so it dies on release build too

svn path=/trunk/; revision=37914
This commit is contained in:
Stefan Ginsberg 2008-12-07 18:05:28 +00:00
parent 2c22befead
commit cdb295c734
12 changed files with 86 additions and 86 deletions

View file

@ -163,7 +163,7 @@ MmPageOutVirtualMemory(PMM_AVL_TABLE AddressSpace,
if (Page == 0)
{
ASSERT(FALSE);
KeBugCheck(MEMORY_MANAGEMENT);
}
/*
@ -301,7 +301,7 @@ MmNotPresentFaultVirtualMemory(PMM_AVL_TABLE AddressSpace,
if (PageOp == NULL)
{
DPRINT1("MmGetPageOp failed");
ASSERT(FALSE);
KeBugCheck(MEMORY_MANAGEMENT);
}
/*
@ -322,12 +322,12 @@ MmNotPresentFaultVirtualMemory(PMM_AVL_TABLE AddressSpace,
if (Status != STATUS_SUCCESS)
{
DPRINT1("Failed to wait for page op\n");
ASSERT(FALSE);
KeBugCheck(MEMORY_MANAGEMENT);
}
if (PageOp->Status == STATUS_PENDING)
{
DPRINT1("Woke for page op before completion\n");
ASSERT(FALSE);
KeBugCheck(MEMORY_MANAGEMENT);
}
/*
* If this wasn't a pagein then we need to restart the handling
@ -373,7 +373,7 @@ MmNotPresentFaultVirtualMemory(PMM_AVL_TABLE AddressSpace,
if (!NT_SUCCESS(Status))
{
DPRINT1("MmRequestPageMemoryConsumer failed, status = %x\n", Status);
ASSERT(FALSE);
KeBugCheck(MEMORY_MANAGEMENT);
}
/*
@ -387,7 +387,7 @@ MmNotPresentFaultVirtualMemory(PMM_AVL_TABLE AddressSpace,
Status = MmReadFromSwapPage(SwapEntry, Page);
if (!NT_SUCCESS(Status))
{
ASSERT(FALSE);
KeBugCheck(MEMORY_MANAGEMENT);
}
MmSetSavedSwapEntryPage(Page, SwapEntry);
}
@ -414,7 +414,7 @@ MmNotPresentFaultVirtualMemory(PMM_AVL_TABLE AddressSpace,
if (!NT_SUCCESS(Status))
{
DPRINT1("MmCreateVirtualMapping failed, not out of memory\n");
ASSERT(FALSE);
KeBugCheck(MEMORY_MANAGEMENT);
return(Status);
}
@ -888,7 +888,7 @@ MmFreeVirtualMemory(PEPROCESS Process,
if (Status != STATUS_SUCCESS)
{
DPRINT1("Failed to wait for page op\n");
ASSERT(FALSE);
KeBugCheck(MEMORY_MANAGEMENT);
}
MmLockAddressSpace(&Process->VadRoot);
MmReleasePageOp(PageOp);

View file

@ -97,7 +97,7 @@ MmReleasePageMemoryConsumer(ULONG Consumer, PFN_TYPE Page)
if (Page == 0)
{
DPRINT1("Tried to release page zero.\n");
ASSERT(FALSE);
KeBugCheck(MEMORY_MANAGEMENT);
}
KeAcquireSpinLock(&AllocationListLock, &oldIrql);
@ -169,7 +169,7 @@ MmRebalanceMemoryConsumers(VOID)
Status = MiMemoryConsumers[i].Trim(Target, 0, &NrFreedPages);
if (!NT_SUCCESS(Status))
{
ASSERT(FALSE);
KeBugCheck(MEMORY_MANAGEMENT);
}
Target = Target - NrFreedPages;
}
@ -326,7 +326,7 @@ MiBalancerThread(PVOID Unused)
Status = MiMemoryConsumers[i].Trim(MiMinimumPagesPerRun, 0, &NrFreedPages);
if (!NT_SUCCESS(Status))
{
ASSERT(FALSE);
KeBugCheck(MEMORY_MANAGEMENT);
}
}
}
@ -357,7 +357,7 @@ MiBalancerThread(PVOID Unused)
Status = MiMemoryConsumers[i].Trim(Target, 0, &NrFreedPages);
if (!NT_SUCCESS(Status))
{
ASSERT(FALSE);
KeBugCheck(MEMORY_MANAGEMENT);
}
}
}
@ -366,7 +366,7 @@ MiBalancerThread(PVOID Unused)
else
{
DPRINT1("KeWaitForMultipleObjects failed, status = %x\n", Status);
ASSERT(FALSE);
KeBugCheck(MEMORY_MANAGEMENT);
}
}
}
@ -406,7 +406,7 @@ MiInitBalancerThread(VOID)
NULL);
if (!NT_SUCCESS(Status))
{
ASSERT(FALSE);
KeBugCheck(MEMORY_MANAGEMENT);
}
Priority = LOW_REALTIME_PRIORITY + 1;

View file

@ -270,7 +270,7 @@ MmInitializePageList(VOID)
if (!NT_SUCCESS(Status))
{
DPRINT1("Unable to create virtual mapping\n");
ASSERT(FALSE);
KeBugCheck(MEMORY_MANAGEMENT);
}
}
else
@ -416,7 +416,7 @@ MmMarkPageMapped(PFN_TYPE Pfn)
if (Page->Flags.Type == MM_PHYSICAL_PAGE_FREE)
{
DPRINT1("Mapping non-used page\n");
ASSERT(FALSE);
KeBugCheck(MEMORY_MANAGEMENT);
}
Page->MapCount++;
Page->ReferenceCount++;
@ -438,12 +438,12 @@ MmMarkPageUnmapped(PFN_TYPE Pfn)
if (Page->Flags.Type == MM_PHYSICAL_PAGE_FREE)
{
DPRINT1("Unmapping non-used page\n");
ASSERT(FALSE);
KeBugCheck(MEMORY_MANAGEMENT);
}
if (Page->MapCount == 0)
{
DPRINT1("Unmapping not mapped page\n");
ASSERT(FALSE);
KeBugCheck(MEMORY_MANAGEMENT);
}
Page->MapCount--;
Page->ReferenceCount--;
@ -511,7 +511,7 @@ MmReferencePageUnsafe(PFN_TYPE Pfn)
if (Page->Flags.Type != MM_PHYSICAL_PAGE_USED)
{
DPRINT1("Referencing non-used page\n");
ASSERT(FALSE);
KeBugCheck(MEMORY_MANAGEMENT);
}
Page->ReferenceCount++;
@ -542,7 +542,7 @@ MmGetReferenceCountPage(PFN_TYPE Pfn)
if (Page->Flags.Type != MM_PHYSICAL_PAGE_USED)
{
DPRINT1("Getting reference count for free page\n");
ASSERT(FALSE);
KeBugCheck(MEMORY_MANAGEMENT);
}
RCount = Page->ReferenceCount;
@ -577,12 +577,12 @@ MmDereferencePage(PFN_TYPE Pfn)
if (Page->Flags.Type != MM_PHYSICAL_PAGE_USED)
{
DPRINT1("Dereferencing free page\n");
ASSERT(FALSE);
KeBugCheck(MEMORY_MANAGEMENT);
}
if (Page->ReferenceCount == 0)
{
DPRINT1("Derefrencing page with reference count 0\n");
ASSERT(FALSE);
KeBugCheck(MEMORY_MANAGEMENT);
}
Page->ReferenceCount--;
@ -594,29 +594,29 @@ MmDereferencePage(PFN_TYPE Pfn)
if (Page->RmapListHead != NULL)
{
DPRINT1("Freeing page with rmap entries.\n");
ASSERT(FALSE);
KeBugCheck(MEMORY_MANAGEMENT);
}
if (Page->MapCount != 0)
{
DPRINT1("Freeing mapped page (0x%x count %d)\n",
Pfn << PAGE_SHIFT, Page->MapCount);
ASSERT(FALSE);
KeBugCheck(MEMORY_MANAGEMENT);
}
if (Page->LockCount > 0)
{
DPRINT1("Freeing locked page\n");
ASSERT(FALSE);
KeBugCheck(MEMORY_MANAGEMENT);
}
if (Page->SavedSwapEntry != 0)
{
DPRINT1("Freeing page with swap entry.\n");
ASSERT(FALSE);
KeBugCheck(MEMORY_MANAGEMENT);
}
if (Page->Flags.Type != MM_PHYSICAL_PAGE_USED)
{
DPRINT1("Freeing page with flags %x\n",
Page->Flags.Type);
ASSERT(FALSE);
KeBugCheck(MEMORY_MANAGEMENT);
}
Page->Flags.Type = MM_PHYSICAL_PAGE_FREE;
Page->Flags.Consumer = MC_MAXIMUM;
@ -647,7 +647,7 @@ MmGetLockCountPage(PFN_TYPE Pfn)
if (Page->Flags.Type != MM_PHYSICAL_PAGE_USED)
{
DPRINT1("Getting lock count for free page\n");
ASSERT(FALSE);
KeBugCheck(MEMORY_MANAGEMENT);
}
LockCount = Page->LockCount;
@ -671,7 +671,7 @@ MmLockPageUnsafe(PFN_TYPE Pfn)
if (Page->Flags.Type != MM_PHYSICAL_PAGE_USED)
{
DPRINT1("Locking free page\n");
ASSERT(FALSE);
KeBugCheck(MEMORY_MANAGEMENT);
}
Page->LockCount++;
@ -702,7 +702,7 @@ MmUnlockPage(PFN_TYPE Pfn)
if (Page->Flags.Type != MM_PHYSICAL_PAGE_USED)
{
DPRINT1("Unlocking free page\n");
ASSERT(FALSE);
KeBugCheck(MEMORY_MANAGEMENT);
}
Page->LockCount--;
@ -757,17 +757,17 @@ MmAllocPage(ULONG Consumer, SWAPENTRY SavedSwapEntry)
if (PageDescriptor->Flags.Type != MM_PHYSICAL_PAGE_FREE)
{
DPRINT1("Got non-free page from freelist\n");
ASSERT(FALSE);
KeBugCheck(MEMORY_MANAGEMENT);
}
if (PageDescriptor->MapCount != 0)
{
DPRINT1("Got mapped page from freelist\n");
ASSERT(FALSE);
KeBugCheck(MEMORY_MANAGEMENT);
}
if (PageDescriptor->ReferenceCount != 0)
{
DPRINT1("%d\n", PageDescriptor->ReferenceCount);
ASSERT(FALSE);
KeBugCheck(MEMORY_MANAGEMENT);
}
PageDescriptor->Flags.Type = MM_PHYSICAL_PAGE_USED;
PageDescriptor->Flags.Consumer = Consumer;
@ -789,7 +789,7 @@ MmAllocPage(ULONG Consumer, SWAPENTRY SavedSwapEntry)
if (PageDescriptor->MapCount != 0)
{
DPRINT1("Returning mapped page.\n");
ASSERT(FALSE);
KeBugCheck(MEMORY_MANAGEMENT);
}
return PfnOffset;
}
@ -970,7 +970,7 @@ MmZeroPageThreadMain(PVOID Ignored)
if (!NT_SUCCESS(Status))
{
DPRINT1("ZeroPageThread: Wait failed\n");
ASSERT(FALSE);
KeBugCheck(MEMORY_MANAGEMENT);
}
if (ZeroPageThreadShouldTerminate)
@ -995,7 +995,7 @@ MmZeroPageThreadMain(PVOID Ignored)
if (PageDescriptor->MapCount != 0)
{
DPRINT1("Mapped page on freelist.\n");
ASSERT(FALSE);
KeBugCheck(MEMORY_MANAGEMENT);
}
PageDescriptor->Flags.Zero = 1;
PageDescriptor->Flags.Type = MM_PHYSICAL_PAGE_FREE;

View file

@ -104,7 +104,7 @@ MmMapIoSpace (IN PHYSICAL_ADDRESS PhysicalAddress,
if (!NT_SUCCESS(Status))
{
DbgPrint("Unable to create virtual mapping\n");
ASSERT(FALSE);
KeBugCheck(MEMORY_MANAGEMENT);
}
}
return (PVOID)((ULONG_PTR)Result + Offset);

View file

@ -899,7 +899,7 @@ MmFreeMemoryAreaByPtr(
BaseAddress);
if (MemoryArea == NULL)
{
ASSERT(FALSE);
KeBugCheck(MEMORY_MANAGEMENT);
return(STATUS_UNSUCCESSFUL);
}
@ -1039,7 +1039,7 @@ MmMapMemoryArea(PVOID BaseAddress,
if (!NT_SUCCESS(Status))
{
DPRINT1("Unable to allocate page\n");
ASSERT(FALSE);
KeBugCheck(MEMORY_MANAGEMENT);
}
Status = MmCreateVirtualMapping (NULL,
(PVOID)((ULONG_PTR)BaseAddress + (i * PAGE_SIZE)),
@ -1049,7 +1049,7 @@ MmMapMemoryArea(PVOID BaseAddress,
if (!NT_SUCCESS(Status))
{
DPRINT1("Unable to create virtual mapping\n");
ASSERT(FALSE);
KeBugCheck(MEMORY_MANAGEMENT);
}
}
}

View file

@ -57,7 +57,7 @@ MmInitializeMdlImplementation(VOID)
if (!NT_SUCCESS(Status))
{
MmUnlockAddressSpace(MmGetKernelAddressSpace());
ASSERT(FALSE);
KeBugCheck(MEMORY_MANAGEMENT);
}
MmUnlockAddressSpace(MmGetKernelAddressSpace());
@ -692,7 +692,7 @@ MmMapLockedPagesSpecifyCache(IN PMDL Mdl,
{
return NULL;
}
ASSERT(FALSE);
KeBugCheck(MEMORY_MANAGEMENT);
}
Base = (PVOID)((ULONG_PTR)MiMdlMappingRegionBase + StartingOffset * PAGE_SIZE);
if (MiMdlMappingRegionHint == StartingOffset) MiMdlMappingRegionHint += PageCount;

View file

@ -71,7 +71,7 @@ MmMpwThreadMain(PVOID Ignored)
if (!NT_SUCCESS(Status))
{
DbgPrint("MpwThread: Wait failed\n");
ASSERT(FALSE);
KeBugCheck(MEMORY_MANAGEMENT);
return(STATUS_UNSUCCESSFUL);
}
if (MpwThreadShouldTerminate)

View file

@ -936,7 +936,7 @@ static void validate_free_list(void)
{
DbgPrint("Bad block magic (probable pool corruption) at %x\n",
current);
ASSERT(FALSE);
KeBugCheck(MEMORY_MANAGEMENT);
}
if (base_addr < MiNonPagedPoolStart ||
@ -946,13 +946,13 @@ static void validate_free_list(void)
DbgPrint("Size %d\n",current->hdr.Size);
DbgPrint("Limits are %x %x\n",MiNonPagedPoolStart,
(ULONG_PTR)MiNonPagedPoolStart+MiNonPagedPoolLength);
ASSERT(FALSE);
KeBugCheck(MEMORY_MANAGEMENT);
}
blocks_seen++;
if (blocks_seen > EiNrFreeBlocks)
{
DbgPrint("Too many blocks on free list\n");
ASSERT(FALSE);
KeBugCheck(MEMORY_MANAGEMENT);
}
p = avl_get_next(FreeBlockListRoot, p);
}
@ -979,7 +979,7 @@ static void validate_used_list(void)
{
DbgPrint("Bad block magic (probable pool corruption) at %x\n",
current);
ASSERT(FALSE);
KeBugCheck(MEMORY_MANAGEMENT);
}
if (base_addr < MiNonPagedPoolStart ||
((ULONG_PTR)base_addr+current->hdr.Size) >
@ -989,13 +989,13 @@ static void validate_used_list(void)
DbgPrint("Size %d\n",current->hdr.Size);
DbgPrint("Limits are %x %x\n",MiNonPagedPoolStart,
(ULONG_PTR)MiNonPagedPoolStart+MiNonPagedPoolLength);
ASSERT(FALSE);
KeBugCheck(MEMORY_MANAGEMENT);
}
blocks_seen++;
if (blocks_seen > EiNrUsedBlocks)
{
DbgPrint("Too many blocks on used list\n");
ASSERT(FALSE);
KeBugCheck(MEMORY_MANAGEMENT);
}
if (current->ListEntry.Flink != &UsedBlockListHead &&
current->ListEntry.Flink->Blink != &current->ListEntry)
@ -1004,7 +1004,7 @@ static void validate_used_list(void)
"current->next->previous %x)\n",
__FILE__,__LINE__,current, current->ListEntry.Flink,
current->ListEntry.Flink->Blink);
ASSERT(FALSE);
KeBugCheck(MEMORY_MANAGEMENT);
}
current_entry = current_entry->Flink;
@ -1035,19 +1035,19 @@ static void check_duplicates(HDR* blk)
{
DbgPrint("Bad block magic (probable pool corruption) at %x\n",
free);
ASSERT(FALSE);
KeBugCheck(MEMORY_MANAGEMENT);
}
if ( (ULONG_PTR)free > base && (ULONG_PTR)free < last )
{
DbgPrint("intersecting blocks on list\n");
ASSERT(FALSE);
KeBugCheck(MEMORY_MANAGEMENT);
}
if ( (ULONG_PTR)free < base &&
((ULONG_PTR)free + free->hdr.Size) > base )
{
DbgPrint("intersecting blocks on list\n");
ASSERT(FALSE);
KeBugCheck(MEMORY_MANAGEMENT);
}
p = avl_get_next(FreeBlockListRoot, p);
}
@ -1060,13 +1060,13 @@ static void check_duplicates(HDR* blk)
if ( (ULONG_PTR)used > base && (ULONG_PTR)used < last )
{
DbgPrint("intersecting blocks on list\n");
ASSERT(FALSE);
KeBugCheck(MEMORY_MANAGEMENT);
}
if ( (ULONG_PTR)used < base &&
((ULONG_PTR)used + used->hdr.Size) > base )
{
DbgPrint("intersecting blocks on list\n");
ASSERT(FALSE);
KeBugCheck(MEMORY_MANAGEMENT);
}
current_entry = current_entry->Flink;
@ -1460,7 +1460,7 @@ ExRosQueryNonPagedPoolTag ( PVOID Addr )
{
HDR_USED* blk=(HDR_USED*)((ULONG_PTR)Addr - HDR_USED_SIZE);
if (blk->hdr.Magic != BLOCK_HDR_USED_MAGIC)
ASSERT(FALSE);
KeBugCheck(MEMORY_MANAGEMENT);
return blk->Tag;
}
@ -1510,7 +1510,7 @@ void check_redzone_header(HDR_USED* hdr)
DbgPrint("NPPOL: High-side redzone overwritten, Block %x, Size %d, Tag %x(%s), Caller %x\n",
(ULONG_PTR)hdr + HDR_USED_SIZE, hdr->UserSize, hdr->Tag, c, hdr->Caller);
}
ASSERT(FALSE);
KeBugCheck(MEMORY_MANAGEMENT);
}
}
#endif
@ -1728,7 +1728,7 @@ MiInitializeNonPagedPool(VOID)
if (!NT_SUCCESS(Status))
{
DbgPrint("Unable to allocate a page\n");
ASSERT(FALSE);
KeBugCheck(MEMORY_MANAGEMENT);
}
Status = MmCreateVirtualMapping(NULL,
@ -1739,7 +1739,7 @@ MiInitializeNonPagedPool(VOID)
if (!NT_SUCCESS(Status))
{
DbgPrint("Unable to create virtual mapping\n");
ASSERT(FALSE);
KeBugCheck(MEMORY_MANAGEMENT);
}
Address = (PVOID)((ULONG_PTR)Address + PAGE_SIZE);
}

View file

@ -205,7 +205,7 @@ MmGetOffsetPageFile(PRETRIEVAL_POINTERS_BUFFER RetrievalPointers, LARGE_INTEGER
first = mid + 1;
}
}
ASSERT(FALSE);
KeBugCheck(MEMORY_MANAGEMENT);
#if defined(__GNUC__)
return (LARGE_INTEGER)0LL;
@ -237,7 +237,7 @@ MmWriteToSwapPage(SWAPENTRY SwapEntry, PFN_TYPE Page)
if (SwapEntry == 0)
{
ASSERT(FALSE);
KeBugCheck(MEMORY_MANAGEMENT);
return(STATUS_UNSUCCESSFUL);
}
@ -247,13 +247,13 @@ MmWriteToSwapPage(SWAPENTRY SwapEntry, PFN_TYPE Page)
if (i >= MAX_PAGING_FILES)
{
DPRINT1("Bad swap entry 0x%.8X\n", SwapEntry);
ASSERT(FALSE);
KeBugCheck(MEMORY_MANAGEMENT);
}
if (PagingFileList[i]->FileObject == NULL ||
PagingFileList[i]->FileObject->DeviceObject == NULL)
{
DPRINT1("Bad paging file 0x%.8X\n", SwapEntry);
ASSERT(FALSE);
KeBugCheck(MEMORY_MANAGEMENT);
}
MmInitializeMdl(Mdl, NULL, PAGE_SIZE);
@ -298,7 +298,7 @@ MmReadFromSwapPage(SWAPENTRY SwapEntry, PFN_TYPE Page)
if (SwapEntry == 0)
{
ASSERT(FALSE);
KeBugCheck(MEMORY_MANAGEMENT);
return(STATUS_UNSUCCESSFUL);
}
@ -308,13 +308,13 @@ MmReadFromSwapPage(SWAPENTRY SwapEntry, PFN_TYPE Page)
if (i >= MAX_PAGING_FILES)
{
DPRINT1("Bad swap entry 0x%.8X\n", SwapEntry);
ASSERT(FALSE);
KeBugCheck(MEMORY_MANAGEMENT);
}
if (PagingFileList[i]->FileObject == NULL ||
PagingFileList[i]->FileObject->DeviceObject == NULL)
{
DPRINT1("Bad paging file 0x%.8X\n", SwapEntry);
ASSERT(FALSE);
KeBugCheck(MEMORY_MANAGEMENT);
}
MmInitializeMdl(Mdl, NULL, PAGE_SIZE);
@ -450,13 +450,13 @@ MmFreeSwapPage(SWAPENTRY Entry)
if (i >= MAX_PAGING_FILES)
{
DPRINT1("Bad swap entry 0x%.8X\n", Entry);
ASSERT(FALSE);
KeBugCheck(MEMORY_MANAGEMENT);
}
KeAcquireSpinLock(&PagingFileListLock, &oldIrql);
if (PagingFileList[i] == NULL)
{
ASSERT(FALSE);
KeBugCheck(MEMORY_MANAGEMENT);
}
KeAcquireSpinLockAtDpcLevel(&PagingFileList[i]->AllocMapLock);
@ -504,7 +504,7 @@ MmAllocSwapPage(VOID)
off = MiAllocPageFromPagingFile(PagingFileList[i]);
if (off == 0xFFFFFFFF)
{
ASSERT(FALSE);
KeBugCheck(MEMORY_MANAGEMENT);
KeReleaseSpinLock(&PagingFileListLock, oldIrql);
return(STATUS_UNSUCCESSFUL);
}
@ -518,7 +518,7 @@ MmAllocSwapPage(VOID)
}
KeReleaseSpinLock(&PagingFileListLock, oldIrql);
ASSERT(FALSE);
KeBugCheck(MEMORY_MANAGEMENT);
return(0);
}

View file

@ -66,7 +66,7 @@ MmReleasePageOp(PMM_PAGEOP PageOp)
PrevPageOp = PrevPageOp->Next;
}
KeReleaseSpinLock(&MmPageOpHashTableLock, oldIrql);
ASSERT(FALSE);
KeBugCheck(MEMORY_MANAGEMENT);
}
PMM_PAGEOP
@ -211,7 +211,7 @@ MmGetPageOp(PMEMORY_AREA MArea, HANDLE Pid, PVOID Address,
if (PageOp == NULL)
{
KeReleaseSpinLock(&MmPageOpHashTableLock, oldIrql);
ASSERT(FALSE);
KeBugCheck(MEMORY_MANAGEMENT);
return(NULL);
}

View file

@ -217,7 +217,7 @@ MmCreateKernelStack(BOOLEAN GuiStack,
if (!NT_SUCCESS(Status))
{
DPRINT1("Failed to create thread stack\n");
ASSERT(FALSE);
KeBugCheck(MEMORY_MANAGEMENT);
}
/*
@ -241,7 +241,7 @@ MmCreateKernelStack(BOOLEAN GuiStack,
if (!NT_SUCCESS(Status))
{
DPRINT1("Could not create Virtual Mapping for Kernel Stack\n");
ASSERT(FALSE);
KeBugCheck(MEMORY_MANAGEMENT);
}
/* Return the stack base */
@ -715,7 +715,7 @@ MmDeleteProcessAddressSpace(PEPROCESS Process)
break;
default:
ASSERT(FALSE);
KeBugCheck(MEMORY_MANAGEMENT);
}
}

View file

@ -81,7 +81,7 @@ MmWritePagePhysicalAddress(PFN_TYPE Page)
Address = entry->Address;
if ((((ULONG_PTR)Address) & 0xFFF) != 0)
{
ASSERT(FALSE);
KeBugCheck(MEMORY_MANAGEMENT);
}
if (Address < MmSystemRangeStart)
{
@ -177,7 +177,7 @@ MmWritePagePhysicalAddress(PFN_TYPE Page)
}
else
{
ASSERT(FALSE);
KeBugCheck(MEMORY_MANAGEMENT);
}
if (Address < MmSystemRangeStart)
{
@ -211,7 +211,7 @@ MmPageOutPhysicalAddress(PFN_TYPE Page)
Address = entry->Address;
if ((((ULONG_PTR)Address) & 0xFFF) != 0)
{
ASSERT(FALSE);
KeBugCheck(MEMORY_MANAGEMENT);
}
if (Address < MmSystemRangeStart)
@ -301,7 +301,7 @@ MmPageOutPhysicalAddress(PFN_TYPE Page)
}
else
{
ASSERT(FALSE);
KeBugCheck(MEMORY_MANAGEMENT);
}
if (Address < MmSystemRangeStart)
{
@ -321,7 +321,7 @@ MmSetCleanAllRmaps(PFN_TYPE Page)
if (current_entry == NULL)
{
DPRINT1("MmIsDirtyRmap: No rmaps.\n");
ASSERT(FALSE);
KeBugCheck(MEMORY_MANAGEMENT);
}
while (current_entry != NULL)
{
@ -342,7 +342,7 @@ MmSetDirtyAllRmaps(PFN_TYPE Page)
if (current_entry == NULL)
{
DPRINT1("MmIsDirtyRmap: No rmaps.\n");
ASSERT(FALSE);
KeBugCheck(MEMORY_MANAGEMENT);
}
while (current_entry != NULL)
{
@ -392,7 +392,7 @@ MmInsertRmap(PFN_TYPE Page, PEPROCESS Process,
new_entry = ExAllocateFromNPagedLookasideList(&RmapLookasideList);
if (new_entry == NULL)
{
ASSERT(FALSE);
KeBugCheck(MEMORY_MANAGEMENT);
}
new_entry->Address = Address;
new_entry->Process = (PEPROCESS)Process;
@ -410,7 +410,7 @@ MmInsertRmap(PFN_TYPE Page, PEPROCESS Process,
"address 0x%.8X\n", Process->UniqueProcessId, Address,
MmGetPfnForProcess(Process, Address) << PAGE_SHIFT,
Page << PAGE_SHIFT);
ASSERT(FALSE);
KeBugCheck(MEMORY_MANAGEMENT);
}
ExAcquireFastMutex(&RmapListLock);
@ -427,7 +427,7 @@ MmInsertRmap(PFN_TYPE Page, PEPROCESS Process,
DbgPrint("\n previous caller ");
DbgPrint("%p", current_entry->Caller);
DbgPrint("\n");
ASSERT(FALSE);
KeBugCheck(MEMORY_MANAGEMENT);
}
current_entry = current_entry->Next;
}
@ -463,7 +463,7 @@ MmDeleteAllRmaps(PFN_TYPE Page, PVOID Context,
if (current_entry == NULL)
{
DPRINT1("MmDeleteAllRmaps: No rmaps.\n");
ASSERT(FALSE);
KeBugCheck(MEMORY_MANAGEMENT);
}
MmSetRmapListHeadPage(Page, NULL);
ExReleaseFastMutex(&RmapListLock);
@ -527,5 +527,5 @@ MmDeleteRmap(PFN_TYPE Page, PEPROCESS Process,
previous_entry = current_entry;
current_entry = current_entry->Next;
}
ASSERT(FALSE);
KeBugCheck(MEMORY_MANAGEMENT);
}