mirror of
https://github.com/reactos/reactos.git
synced 2025-05-28 21:48:19 +00:00
[NTOSKRNL] Save system size on init in CcCapturedSystemSize
This commit is contained in:
parent
19737a2cb9
commit
ee7b3b315d
1 changed files with 4 additions and 1 deletions
|
@ -65,6 +65,7 @@ ULONG CcLazyWriteIos = 0;
|
||||||
* - Spinlock when dealing with the deferred list
|
* - Spinlock when dealing with the deferred list
|
||||||
* - List for "clean" shared cache maps
|
* - List for "clean" shared cache maps
|
||||||
* - One second delay for lazy writer
|
* - One second delay for lazy writer
|
||||||
|
* - System size when system started
|
||||||
*/
|
*/
|
||||||
ULONG CcDirtyPageThreshold = 0;
|
ULONG CcDirtyPageThreshold = 0;
|
||||||
ULONG CcTotalDirtyPages = 0;
|
ULONG CcTotalDirtyPages = 0;
|
||||||
|
@ -72,6 +73,7 @@ LIST_ENTRY CcDeferredWrites;
|
||||||
KSPIN_LOCK CcDeferredWriteSpinLock;
|
KSPIN_LOCK CcDeferredWriteSpinLock;
|
||||||
LIST_ENTRY CcCleanSharedCacheMapList;
|
LIST_ENTRY CcCleanSharedCacheMapList;
|
||||||
LARGE_INTEGER CcIdleDelay = RTL_CONSTANT_LARGE_INTEGER((LONGLONG)-1*1000*1000*10);
|
LARGE_INTEGER CcIdleDelay = RTL_CONSTANT_LARGE_INTEGER((LONGLONG)-1*1000*1000*10);
|
||||||
|
MM_SYSTEMSIZE CcCapturedSystemSize;
|
||||||
|
|
||||||
/* Internal vars (ROS):
|
/* Internal vars (ROS):
|
||||||
* - Event to notify lazy writer to shutdown
|
* - Event to notify lazy writer to shutdown
|
||||||
|
@ -1447,7 +1449,8 @@ CcInitView (
|
||||||
KeInitializeEvent(&iLazyWriterNotify, NotificationEvent, FALSE);
|
KeInitializeEvent(&iLazyWriterNotify, NotificationEvent, FALSE);
|
||||||
|
|
||||||
/* Define lazy writer threshold, depending on system type */
|
/* Define lazy writer threshold, depending on system type */
|
||||||
switch (MmQuerySystemSize())
|
CcCapturedSystemSize = MmQuerySystemSize();
|
||||||
|
switch (CcCapturedSystemSize)
|
||||||
{
|
{
|
||||||
case MmSmallSystem:
|
case MmSmallSystem:
|
||||||
CcDirtyPageThreshold = MmNumberOfPhysicalPages / 8;
|
CcDirtyPageThreshold = MmNumberOfPhysicalPages / 8;
|
||||||
|
|
Loading…
Reference in a new issue