https://git.reactos.org/?p=reactos.git;a=commitdiff;h=4d974e56eeabc0fe74a7d…
commit 4d974e56eeabc0fe74a7d74785c1bf505e8ea3f7
Author: Pierre Schweitzer <pierre(a)reactos.org>
AuthorDate: Sun Dec 9 18:25:11 2018 +0100
Commit: Pierre Schweitzer <pierre(a)reactos.org>
CommitDate: Sun Dec 9 18:25:11 2018 +0100
[NTOSKRNL] Return the amount of hits in system lookaside lists in ExQueryPoolUsage()
---
ntoskrnl/mm/ARM3/expool.c | 26 +++++++++++++++++++++++---
1 file changed, 23 insertions(+), 3 deletions(-)
diff --git a/ntoskrnl/mm/ARM3/expool.c b/ntoskrnl/mm/ARM3/expool.c
index de75cfbd25..0828126d87 100644
--- a/ntoskrnl/mm/ARM3/expool.c
+++ b/ntoskrnl/mm/ARM3/expool.c
@@ -1669,10 +1669,30 @@ ExQueryPoolUsage(OUT PULONG PagedPoolPages,
#endif
//
- // FIXME: Not yet supported
+ // Get the amount of hits in the system lookaside lists
//
- *NonPagedPoolLookasideHits += 0;
- *PagedPoolLookasideHits += 0;
+ if (!IsListEmpty(&ExPoolLookasideListHead))
+ {
+ PLIST_ENTRY ListEntry;
+
+ for (ListEntry = ExPoolLookasideListHead.Flink;
+ ListEntry != &ExPoolLookasideListHead;
+ ListEntry = ListEntry->Flink)
+ {
+ PGENERAL_LOOKASIDE Lookaside;
+
+ Lookaside = CONTAINING_RECORD(ListEntry, GENERAL_LOOKASIDE, ListEntry);
+
+ if (Lookaside->Type == NonPagedPool)
+ {
+ *NonPagedPoolLookasideHits += Lookaside->AllocateHits;
+ }
+ else
+ {
+ *PagedPoolLookasideHits += Lookaside->AllocateHits;
+ }
+ }
+ }
}
VOID