https://git.reactos.org/?p=reactos.git;a=commitdiff;h=708dc6b7d6c2844727902…
commit 708dc6b7d6c28447279025480885e3f608224694
Author: Jérôme Gardou <jerome.gardou(a)reactos.org>
AuthorDate: Mon Aug 2 17:06:35 2021 +0200
Commit: Jérôme Gardou <zefklop(a)users.noreply.github.com>
CommitDate: Wed Aug 4 17:48:39 2021 +0200
[NTOS:MM] Do not zero-fill pages when not needed
---
ntoskrnl/mm/ARM3/pagfault.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/ntoskrnl/mm/ARM3/pagfault.c b/ntoskrnl/mm/ARM3/pagfault.c
index 8d1ce33c399..a5dd04560d3 100644
--- a/ntoskrnl/mm/ARM3/pagfault.c
+++ b/ntoskrnl/mm/ARM3/pagfault.c
@@ -674,6 +674,11 @@ MiResolveDemandZeroFault(IN PVOID Address,
PageFrameNumber = MiRemoveAnyPage(Color);
NeedZero = TRUE;
}
+ else
+ {
+ /* Page guaranteed to be zero-filled */
+ NeedZero = FALSE;
+ }
}
else
{
@@ -688,6 +693,8 @@ MiResolveDemandZeroFault(IN PVOID Address,
{
/* System wants a zero page, obtain one */
PageFrameNumber = MiRemoveZeroPage(Color);
+ /* No need to zero-fill it */
+ NeedZero = FALSE;
}
}