https://git.reactos.org/?p=reactos.git;a=commitdiff;h=bdae0cce6640f59b127a4…
commit bdae0cce6640f59b127a4fc20309d7e87a8603dd
Author: Pierre Schweitzer <pierre(a)reactos.org>
AuthorDate: Sat Feb 17 15:09:38 2018 +0100
Commit: Pierre Schweitzer <pierre(a)reactos.org>
CommitDate: Sat Feb 17 15:09:38 2018 +0100
[NTOSKRNL] Don't call OOM dumper in case we were trying to allocate more than 100
pages.
In such case, we'll consider the caller is bogus and we'll fail in silence.
Dedicated to Mark (again!)
---
ntoskrnl/mm/ARM3/expool.c | 16 ++++++++++++++--
1 file changed, 14 insertions(+), 2 deletions(-)
diff --git a/ntoskrnl/mm/ARM3/expool.c b/ntoskrnl/mm/ARM3/expool.c
index 54c6990be5..de75cfbd25 100644
--- a/ntoskrnl/mm/ARM3/expool.c
+++ b/ntoskrnl/mm/ARM3/expool.c
@@ -1810,8 +1810,14 @@ ExAllocatePoolWithTag(IN POOL_TYPE PoolType,
#if DBG
//
// Out of memory, display current consumption
+ // Let's consider that if the caller wanted more
+ // than a hundred pages, that's a bogus caller
+ // and we are not out of memory
//
- MiDumpPoolConsumers(FALSE, 0, 0, 0);
+ if (NumberOfBytes < 100 * PAGE_SIZE)
+ {
+ MiDumpPoolConsumers(FALSE, 0, 0, 0);
+ }
#endif
//
@@ -2143,8 +2149,14 @@ ExAllocatePoolWithTag(IN POOL_TYPE PoolType,
#if DBG
//
// Out of memory, display current consumption
+ // Let's consider that if the caller wanted more
+ // than a hundred pages, that's a bogus caller
+ // and we are not out of memory
//
- MiDumpPoolConsumers(FALSE, 0, 0, 0);
+ if (NumberOfBytes < 100 * PAGE_SIZE)
+ {
+ MiDumpPoolConsumers(FALSE, 0, 0, 0);
+ }
#endif
//