https://git.reactos.org/?p=reactos.git;a=commitdiff;h=ee7b3b315d343e73ea0bb…
commit ee7b3b315d343e73ea0bb6c130660bb67bc83667
Author: Pierre Schweitzer <pierre(a)reactos.org>
AuthorDate: Wed Feb 7 17:49:23 2018 +0100
Commit: Pierre Schweitzer <pierre(a)reactos.org>
CommitDate: Wed Feb 7 21:37:17 2018 +0100
[NTOSKRNL] Save system size on init in CcCapturedSystemSize
---
ntoskrnl/cc/view.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/ntoskrnl/cc/view.c b/ntoskrnl/cc/view.c
index cf2fc328b1..9344a97c8d 100644
--- a/ntoskrnl/cc/view.c
+++ b/ntoskrnl/cc/view.c
@@ -65,6 +65,7 @@ ULONG CcLazyWriteIos = 0;
* - Spinlock when dealing with the deferred list
* - List for "clean" shared cache maps
* - One second delay for lazy writer
+ * - System size when system started
*/
ULONG CcDirtyPageThreshold = 0;
ULONG CcTotalDirtyPages = 0;
@@ -72,6 +73,7 @@ LIST_ENTRY CcDeferredWrites;
KSPIN_LOCK CcDeferredWriteSpinLock;
LIST_ENTRY CcCleanSharedCacheMapList;
LARGE_INTEGER CcIdleDelay = RTL_CONSTANT_LARGE_INTEGER((LONGLONG)-1*1000*1000*10);
+MM_SYSTEMSIZE CcCapturedSystemSize;
/* Internal vars (ROS):
* - Event to notify lazy writer to shutdown
@@ -1447,7 +1449,8 @@ CcInitView (
KeInitializeEvent(&iLazyWriterNotify, NotificationEvent, FALSE);
/* Define lazy writer threshold, depending on system type */
- switch (MmQuerySystemSize())
+ CcCapturedSystemSize = MmQuerySystemSize();
+ switch (CcCapturedSystemSize)
{
case MmSmallSystem:
CcDirtyPageThreshold = MmNumberOfPhysicalPages / 8;