mirror of
https://github.com/reactos/reactos.git
synced 2025-02-24 17:34:57 +00:00
[NTOS:MM]
- Print some debug information on assertion failures in MiDecrementReferenceCount. CORE-6690 svn path=/trunk/; revision=60502
This commit is contained in:
parent
2a0449a453
commit
2bcc09b5e0
1 changed files with 12 additions and 3 deletions
|
@ -1308,9 +1308,18 @@ MiDecrementReferenceCount(IN PMMPFN Pfn1,
|
|||
ASSERT(KeGetCurrentIrql() == DISPATCH_LEVEL);
|
||||
|
||||
/* Sanity checks on the page */
|
||||
ASSERT(PageFrameIndex < MmHighestPhysicalPage);
|
||||
ASSERT(Pfn1 == MI_PFN_ELEMENT(PageFrameIndex));
|
||||
ASSERT(Pfn1->u3.e2.ReferenceCount != 0);
|
||||
if (PageFrameIndex >= MmHighestPhysicalPage ||
|
||||
Pfn1 != MI_PFN_ELEMENT(PageFrameIndex) ||
|
||||
Pfn1->u3.e2.ReferenceCount == 0 ||
|
||||
Pfn1->u3.e2.ReferenceCount >= 2500)
|
||||
{
|
||||
DPRINT1("PageFrameIndex=0x%lx, MmHighestPhysicalPage=0x%lx\n", PageFrameIndex, MmHighestPhysicalPage);
|
||||
DPRINT1("Pfn1=%p, Element=%p, RefCount=%u\n", Pfn1, MI_PFN_ELEMENT(PageFrameIndex), Pfn1->u3.e2.ReferenceCount);
|
||||
ASSERT(PageFrameIndex < MmHighestPhysicalPage);
|
||||
ASSERT(Pfn1 == MI_PFN_ELEMENT(PageFrameIndex));
|
||||
ASSERT(Pfn1->u3.e2.ReferenceCount != 0);
|
||||
ASSERT(Pfn1->u3.e2.ReferenceCount < 2500);
|
||||
}
|
||||
|
||||
/* Dereference the page, bail out if it's still alive */
|
||||
InterlockedDecrement16((PSHORT)&Pfn1->u3.e2.ReferenceCount);
|
||||
|
|
Loading…
Reference in a new issue