https://git.reactos.org/?p=reactos.git;a=commitdiff;h=1433ade827f95c49a1950…
commit 1433ade827f95c49a1950b46d087e3d4c69cd9e7
Author: Pierre Schweitzer <pierre(a)reactos.org>
AuthorDate: Fri Dec 29 09:04:34 2017 +0100
[NTOSKRNL] Add support for the paged pool in the memory dumper
---
ntoskrnl/mm/ARM3/expool.c | 19 +++++++++++++------
1 file changed, 13 insertions(+), 6 deletions(-)
diff --git a/ntoskrnl/mm/ARM3/expool.c b/ntoskrnl/mm/ARM3/expool.c
index 760956ba25..528d534487 100644
--- a/ntoskrnl/mm/ARM3/expool.c
+++ b/ntoskrnl/mm/ARM3/expool.c
@@ -500,7 +500,8 @@ MiDumpNonPagedPoolConsumers(BOOLEAN CalledFromDbg)
//
// Print table header
//
- MiDumperPrint(CalledFromDbg, "Tag\t\tAllocs\t\tUsed\n");
+ MiDumperPrint(CalledFromDbg, "\t\tNonPaged\t\t\tPaged\n");
+ MiDumperPrint(CalledFromDbg, "Tag\t\tAllocs\t\tUsed\t\tAllocs\t\tUsed\n");
//
// We'll extract allocations for all the tracked pools
@@ -512,9 +513,9 @@ MiDumpNonPagedPoolConsumers(BOOLEAN CalledFromDbg)
TableEntry = &PoolTrackTable[i];
//
- // We only care about non paged
+ // We only care about tags which have allocated memory
//
- if (TableEntry->NonPagedBytes != 0)
+ if (TableEntry->NonPagedBytes != 0 || TableEntry->PagedBytes != 0)
{
//
// If there's a tag, attempt to do a pretty print
@@ -536,16 +537,22 @@ MiDumpNonPagedPoolConsumers(BOOLEAN CalledFromDbg)
//
// Print in reversed order to match what is in source code
//
- MiDumperPrint(CalledFromDbg,
"'%c%c%c%c'\t\t%ld\t\t%ld\n", Tag[3], Tag[2], Tag[1], Tag[0],
TableEntry->NonPagedAllocs, TableEntry->NonPagedBytes);
+ MiDumperPrint(CalledFromDbg,
"'%c%c%c%c'\t\t%ld\t\t%ld\t\t%ld\t\t%ld\n", Tag[3], Tag[2], Tag[1],
Tag[0],
+ TableEntry->NonPagedAllocs,
TableEntry->NonPagedBytes,
+ TableEntry->PagedAllocs,
TableEntry->PagedBytes);
}
else
{
- MiDumperPrint(CalledFromDbg, "%x\t%ld\t\t%ld\n",
TableEntry->Key, TableEntry->NonPagedAllocs, TableEntry->NonPagedBytes);
+ MiDumperPrint(CalledFromDbg,
"%x\t%ld\t\t%ld\t\t%ld\t\t%ld\n", TableEntry->Key,
+ TableEntry->NonPagedAllocs,
TableEntry->NonPagedBytes,
+ TableEntry->PagedAllocs,
TableEntry->PagedBytes);
}
}
else
{
- MiDumperPrint(CalledFromDbg, "Anon\t\t%ld\t\t%ld\n",
TableEntry->NonPagedAllocs, TableEntry->NonPagedBytes);
+ MiDumperPrint(CalledFromDbg,
"Anon\t\t%ld\t\t%ld\t\t%ld\t\t%ld\n",
+ TableEntry->NonPagedAllocs,
TableEntry->NonPagedBytes,
+ TableEntry->PagedAllocs, TableEntry->PagedBytes);
}
}
}