mirror of
https://github.com/reactos/reactos.git
synced 2025-05-08 11:24:14 +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;
|
||||||
|
|
||||||
|
@ -234,10 +236,17 @@ ExpKdbgExtPoolFindLargePool(
|
||||||
|
|
||||||
if ((PoolBigPageTable[i].Key & Mask) == (Tag & Mask))
|
if ((PoolBigPageTable[i].Key & Mask) == (Tag & Mask))
|
||||||
{
|
{
|
||||||
/* Print the line */
|
if (FoundCallback != NULL)
|
||||||
KdbpPrint("%p: tag %.4s, size: %I64x\n",
|
{
|
||||||
PoolBigPageTable[i].Va, (PCHAR)&PoolBigPageTable[i].Key,
|
FoundCallback(PoolBigPageTable[i].Va, CallbackContext);
|
||||||
PoolBigPageTable[i].NumberOfPages << PAGE_SHIFT);
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/* Print the line */
|
||||||
|
KdbpPrint("%p: tag %.4s, size: %I64x\n",
|
||||||
|
PoolBigPageTable[i].Va, (PCHAR)&PoolBigPageTable[i].Key,
|
||||||
|
PoolBigPageTable[i].NumberOfPages << PAGE_SHIFT);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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