[NTOSKRNL] Now that the memory dumper handles paged pool, make use of it in any situation
authorPierre Schweitzer <pierre@reactos.org>
Fri, 29 Dec 2017 15:45:50 +0000 (16:45 +0100)
committerPierre Schweitzer <pierre@reactos.org>
Fri, 29 Dec 2017 16:23:36 +0000 (17:23 +0100)
ntoskrnl/kdbg/kdb_cli.c
ntoskrnl/mm/ARM3/expool.c

index ff87f56..257058c 100644 (file)
@@ -185,7 +185,7 @@ static const struct
     { "kmsg", "kmsg", "Kernel dmesg. Alias for dmesg.", KdbpCmdDmesg },
     { "help", "help", "Display help screen.", KdbpCmdHelp },
     { "!pool", "!pool [Address [Flags]]", "Display information about pool allocations.", ExpKdbgExtPool },
-    { "!poolused", "!poolused", "Display non-paged pool usage.", ExpKdbgExtPoolUsed },
+    { "!poolused", "!poolused", "Display pool usage.", ExpKdbgExtPoolUsed },
 };
 
 /* FUNCTIONS *****************************************************************/
index 528d534..732ab2d 100644 (file)
@@ -480,7 +480,7 @@ ExpTagAllowPrint(CHAR Tag)
     else DPRINT1(fmt, ##__VA_ARGS__)
 
 VOID
-MiDumpNonPagedPoolConsumers(BOOLEAN CalledFromDbg)
+MiDumpPoolConsumers(BOOLEAN CalledFromDbg)
 {
     SIZE_T i;
 
@@ -1747,12 +1747,9 @@ ExAllocatePoolWithTag(IN POOL_TYPE PoolType,
         {
 #if DBG
             //
-            // If non paged backed, display current consumption
+            // Out of memory, display current consumption
             //
-            if ((OriginalType & BASE_POOL_TYPE_MASK) == NonPagedPool)
-            {
-                MiDumpNonPagedPoolConsumers(FALSE);
-            }
+            MiDumpPoolConsumers(FALSE);
 #endif
 
             //
@@ -2083,12 +2080,9 @@ ExAllocatePoolWithTag(IN POOL_TYPE PoolType,
     {
 #if DBG
         //
-        // If non paged backed, display current consumption
+        // Out of memory, display current consumption
         //
-        if ((OriginalType & BASE_POOL_TYPE_MASK) == NonPagedPool)
-        {
-            MiDumpNonPagedPoolConsumers(FALSE);
-        }
+        MiDumpPoolConsumers(FALSE);
 #endif
 
         //
@@ -2948,7 +2942,7 @@ ExpKdbgExtPoolUsed(
     ULONG Argc,
     PCHAR Argv[])
 {
-    MiDumpNonPagedPoolConsumers(TRUE);
+    MiDumpPoolConsumers(TRUE);
 
     return TRUE;
 }