[NTOSKRNL] Now that the memory dumper handles paged pool, make use of it in any situation

This commit is contained in:
Pierre Schweitzer 2017-12-29 16:45:50 +01:00
parent 1433ade827
commit 879d8f2104
No known key found for this signature in database
GPG key ID: 7545556C3D585B0B
2 changed files with 7 additions and 13 deletions

View 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 *****************************************************************/

View 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;
}