Author: tfaber
Date: Tue Oct 1 17:51:38 2013
New Revision: 60502
URL:
http://svn.reactos.org/svn/reactos?rev=60502&view=rev
Log:
[NTOS:MM]
- Print some debug information on assertion failures in MiDecrementReferenceCount.
CORE-6690
Modified:
trunk/reactos/ntoskrnl/mm/ARM3/pfnlist.c
Modified: trunk/reactos/ntoskrnl/mm/ARM3/pfnlist.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/ARM3/pfnlist.c…
==============================================================================
--- trunk/reactos/ntoskrnl/mm/ARM3/pfnlist.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/mm/ARM3/pfnlist.c [iso-8859-1] Tue Oct 1 17:51:38 2013
@@ -1308,9 +1308,18 @@
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);