mirror of
https://github.com/reactos/reactos.git
synced 2025-05-13 14:20:31 +00:00
[NTOSKRNL] Add support for callback when enumerating large pool allocations
This commit is contained in:
parent
7e396787ed
commit
d9a3fd16d4
1 changed files with 15 additions and 6 deletions
|
@ -218,7 +218,9 @@ static
|
||||||
VOID
|
VOID
|
||||||
ExpKdbgExtPoolFindLargePool(
|
ExpKdbgExtPoolFindLargePool(
|
||||||
ULONG Tag,
|
ULONG Tag,
|
||||||
ULONG Mask)
|
ULONG Mask,
|
||||||
|
VOID (NTAPI* FoundCallback)(PVOID, PVOID),
|
||||||
|
PVOID CallbackContext)
|
||||||
{
|
{
|
||||||
ULONG i;
|
ULONG i;
|
||||||
|
|
||||||
|
@ -233,6 +235,12 @@ ExpKdbgExtPoolFindLargePool(
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((PoolBigPageTable[i].Key & Mask) == (Tag & Mask))
|
if ((PoolBigPageTable[i].Key & Mask) == (Tag & Mask))
|
||||||
|
{
|
||||||
|
if (FoundCallback != NULL)
|
||||||
|
{
|
||||||
|
FoundCallback(PoolBigPageTable[i].Va, CallbackContext);
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
/* Print the line */
|
/* Print the line */
|
||||||
KdbpPrint("%p: tag %.4s, size: %I64x\n",
|
KdbpPrint("%p: tag %.4s, size: %I64x\n",
|
||||||
|
@ -241,6 +249,7 @@ ExpKdbgExtPoolFindLargePool(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static
|
static
|
||||||
BOOLEAN
|
BOOLEAN
|
||||||
|
@ -456,7 +465,7 @@ ExpKdbgExtPoolFind(
|
||||||
}
|
}
|
||||||
|
|
||||||
/* First search for large allocations */
|
/* First search for large allocations */
|
||||||
ExpKdbgExtPoolFindLargePool(Tag, Mask);
|
ExpKdbgExtPoolFindLargePool(Tag, Mask, NULL, NULL);
|
||||||
|
|
||||||
if (PoolType == NonPagedPool)
|
if (PoolType == NonPagedPool)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue