mirror of
https://github.com/reactos/reactos.git
synced 2025-02-22 16:36:33 +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
|
||||
ExpKdbgExtPoolFindLargePool(
|
||||
ULONG Tag,
|
||||
ULONG Mask)
|
||||
ULONG Mask,
|
||||
VOID (NTAPI* FoundCallback)(PVOID, PVOID),
|
||||
PVOID CallbackContext)
|
||||
{
|
||||
ULONG i;
|
||||
|
||||
|
@ -234,10 +236,17 @@ ExpKdbgExtPoolFindLargePool(
|
|||
|
||||
if ((PoolBigPageTable[i].Key & Mask) == (Tag & Mask))
|
||||
{
|
||||
/* Print the line */
|
||||
KdbpPrint("%p: tag %.4s, size: %I64x\n",
|
||||
PoolBigPageTable[i].Va, (PCHAR)&PoolBigPageTable[i].Key,
|
||||
PoolBigPageTable[i].NumberOfPages << PAGE_SHIFT);
|
||||
if (FoundCallback != NULL)
|
||||
{
|
||||
FoundCallback(PoolBigPageTable[i].Va, CallbackContext);
|
||||
}
|
||||
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 */
|
||||
ExpKdbgExtPoolFindLargePool(Tag, Mask);
|
||||
ExpKdbgExtPoolFindLargePool(Tag, Mask, NULL, NULL);
|
||||
|
||||
if (PoolType == NonPagedPool)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue