https://git.reactos.org/?p=reactos.git;a=commitdiff;h=9bf672d4f13baf52300021...
commit 9bf672d4f13baf52300021a0074358c5c52e2f6a Author: Stanislav Motylkov x86corez@gmail.com AuthorDate: Fri Oct 4 15:22:27 2019 +0300 Commit: Timo Kreuzer timo.kreuzer@reactos.org CommitDate: Sun Oct 27 06:32:50 2019 +0100
[NTOS:MM] Add debug print to MiAllocateContiguousMemory in out-of-memory case --- ntoskrnl/mm/ARM3/contmem.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/ntoskrnl/mm/ARM3/contmem.c b/ntoskrnl/mm/ARM3/contmem.c index 506f988b81f..e8895b0a2fe 100644 --- a/ntoskrnl/mm/ARM3/contmem.c +++ b/ntoskrnl/mm/ARM3/contmem.c @@ -444,11 +444,16 @@ MiAllocateContiguousMemory(IN SIZE_T NumberOfBytes, // // Otherwise, we'll go try to find some // - return MiFindContiguousMemory(LowestAcceptablePfn, - HighestAcceptablePfn, - BoundaryPfn, - SizeInPages, - CacheType); + BaseAddress = MiFindContiguousMemory(LowestAcceptablePfn, + HighestAcceptablePfn, + BoundaryPfn, + SizeInPages, + CacheType); + if (!BaseAddress) + { + DPRINT1("Unable to allocate contiguous memory for %d bytes (%d pages), out of memory!\n", NumberOfBytes, SizeInPages); + } + return BaseAddress; }
VOID