struct _MM_RMAP_ENTRY* Next;
PEPROCESS Process;
PVOID Address;
-#ifdef DBG
+#if DBG
PVOID Caller;
#endif
}
{
PMM_RMAP_ENTRY entry;
PMEMORY_AREA MemoryArea;
- PMM_AVL_TABLE AddressSpace;
+ PMMSUPPORT AddressSpace;
ULONG Type;
PVOID Address;
PEPROCESS Process;
Address = entry->Address;
if ((((ULONG_PTR)Address) & 0xFFF) != 0)
{
- ASSERT(FALSE);
+ KeBugCheck(MEMORY_MANAGEMENT);
}
if (Address < MmSystemRangeStart)
{
{
return Status;
}
- AddressSpace = &Process->VadRoot;
+ AddressSpace = &Process->Vm;
}
else
{
}
else
{
- ASSERT(FALSE);
+ KeBugCheck(MEMORY_MANAGEMENT);
}
if (Address < MmSystemRangeStart)
{
{
PMM_RMAP_ENTRY entry;
PMEMORY_AREA MemoryArea;
- PMM_AVL_TABLE AddressSpace;
+ PMMSUPPORT AddressSpace;
ULONG Type;
PVOID Address;
PEPROCESS Process;
ExAcquireFastMutex(&RmapListLock);
entry = MmGetRmapListHeadPage(Page);
- if (entry == NULL || MmGetLockCountPage(Page) != 0)
+ if (entry == NULL)
{
ExReleaseFastMutex(&RmapListLock);
return(STATUS_UNSUCCESSFUL);
Address = entry->Address;
if ((((ULONG_PTR)Address) & 0xFFF) != 0)
{
- ASSERT(FALSE);
+ KeBugCheck(MEMORY_MANAGEMENT);
}
if (Address < MmSystemRangeStart)
{
return Status;
}
- AddressSpace = &Process->VadRoot;
+ AddressSpace = &Process->Vm;
}
else
{
if (Type == MEMORY_AREA_SECTION_VIEW)
{
Offset = (ULONG_PTR)Address - (ULONG_PTR)MemoryArea->StartingAddress
- + MemoryArea->Data.SectionData.ViewOffset;;
+ + MemoryArea->Data.SectionData.ViewOffset;
/*
* Get or create a pageop
}
else
{
- ASSERT(FALSE);
+ KeBugCheck(MEMORY_MANAGEMENT);
}
if (Address < MmSystemRangeStart)
{
if (current_entry == NULL)
{
DPRINT1("MmIsDirtyRmap: No rmaps.\n");
- ASSERT(FALSE);
+ KeBugCheck(MEMORY_MANAGEMENT);
}
while (current_entry != NULL)
{
if (current_entry == NULL)
{
DPRINT1("MmIsDirtyRmap: No rmaps.\n");
- ASSERT(FALSE);
+ KeBugCheck(MEMORY_MANAGEMENT);
}
while (current_entry != NULL)
{
new_entry = ExAllocateFromNPagedLookasideList(&RmapLookasideList);
if (new_entry == NULL)
{
- ASSERT(FALSE);
+ KeBugCheck(MEMORY_MANAGEMENT);
}
new_entry->Address = Address;
new_entry->Process = (PEPROCESS)Process;
-#ifdef DBG
+#if DBG
#ifdef __GNUC__
new_entry->Caller = __builtin_return_address(0);
#else
"address 0x%.8X\n", Process->UniqueProcessId, Address,
MmGetPfnForProcess(Process, Address) << PAGE_SHIFT,
Page << PAGE_SHIFT);
- ASSERT(FALSE);
+ KeBugCheck(MEMORY_MANAGEMENT);
}
ExAcquireFastMutex(&RmapListLock);
current_entry = MmGetRmapListHeadPage(Page);
new_entry->Next = current_entry;
-#ifdef DBG
+#if DBG
while (current_entry)
{
if (current_entry->Address == new_entry->Address && current_entry->Process == new_entry->Process)
DbgPrint("\n previous caller ");
DbgPrint("%p", current_entry->Caller);
DbgPrint("\n");
- ASSERT(FALSE);
+ KeBugCheck(MEMORY_MANAGEMENT);
}
current_entry = current_entry->Next;
}
if (current_entry == NULL)
{
DPRINT1("MmDeleteAllRmaps: No rmaps.\n");
- ASSERT(FALSE);
+ KeBugCheck(MEMORY_MANAGEMENT);
}
MmSetRmapListHeadPage(Page, NULL);
ExReleaseFastMutex(&RmapListLock);
previous_entry = current_entry;
current_entry = current_entry->Next;
}
- ASSERT(FALSE);
+ KeBugCheck(MEMORY_MANAGEMENT);
}