ReactOS 0.4.15-dev-6057-gd708c79
balance.c File Reference
#include <ntoskrnl.h>
#include <debug.h>
#include "ARM3/miarm.h"
Include dependency graph for balance.c:

Go to the source code of this file.

Classes

struct  _MM_ALLOCATION_REQUEST
 

Macros

#define NDEBUG
 

Typedefs

typedef struct _MM_ALLOCATION_REQUEST MM_ALLOCATION_REQUEST
 
typedef struct _MM_ALLOCATION_REQUESTPMM_ALLOCATION_REQUEST
 

Functions

VOID NTAPI MmInitializeBalancer (ULONG NrAvailablePages, ULONG NrSystemPages)
 
VOID NTAPI MmInitializeMemoryConsumer (ULONG Consumer, NTSTATUS(*Trim)(ULONG Target, ULONG Priority, PULONG NrFreed))
 
VOID NTAPI MiZeroPhysicalPage (IN PFN_NUMBER PageFrameIndex)
 
NTSTATUS NTAPI MmReleasePageMemoryConsumer (ULONG Consumer, PFN_NUMBER Page)
 
ULONG NTAPI MiTrimMemoryConsumer (ULONG Consumer, ULONG InitialTarget)
 
NTSTATUS MmTrimUserMemory (ULONG Target, ULONG Priority, PULONG NrFreedPages)
 
VOID NTAPI MmRebalanceMemoryConsumers (VOID)
 
NTSTATUS NTAPI MmRequestPageMemoryConsumer (ULONG Consumer, BOOLEAN CanWait, PPFN_NUMBER AllocatedPage)
 
VOID NTAPI MiBalancerThread (PVOID Unused)
 
VOID NTAPI MiInitBalancerThread (VOID)
 

Variables

MM_MEMORY_CONSUMER MiMemoryConsumers [MC_MAXIMUM]
 
static ULONG MiMinimumAvailablePages
 
static ULONG MiMinimumPagesPerRun
 
static CLIENT_ID MiBalancerThreadId
 
static HANDLE MiBalancerThreadHandle = NULL
 
static KEVENT MiBalancerEvent
 
static KTIMER MiBalancerTimer
 
static LONG PageOutThreadActive
 

Macro Definition Documentation

◆ NDEBUG

#define NDEBUG

Definition at line 14 of file balance.c.

Typedef Documentation

◆ MM_ALLOCATION_REQUEST

◆ PMM_ALLOCATION_REQUEST

Function Documentation

◆ MiBalancerThread()

VOID NTAPI MiBalancerThread ( PVOID  Unused)

Definition at line 305 of file balance.c.

306{
307 PVOID WaitObjects[2];
309 ULONG i;
310
311 WaitObjects[0] = &MiBalancerEvent;
312 WaitObjects[1] = &MiBalancerTimer;
313
314 while (1)
315 {
317 WaitObjects,
318 WaitAny,
319 Executive,
321 FALSE,
322 NULL,
323 NULL);
324
326 {
327 ULONG InitialTarget = 0;
328
329 do
330 {
331 ULONG OldTarget = InitialTarget;
332
333 /* Trim each consumer */
334 for (i = 0; i < MC_MAXIMUM; i++)
335 {
336 InitialTarget = MiTrimMemoryConsumer(i, InitialTarget);
337 }
338
339 /* No pages left to swap! */
340 if (InitialTarget != 0 &&
341 InitialTarget == OldTarget)
342 {
343 /* Game over */
344 KeBugCheck(NO_PAGES_AVAILABLE);
345 }
346 }
347 while (InitialTarget != 0);
348
349 if (Status == STATUS_WAIT_0)
351 }
352 else
353 {
354 DPRINT1("KeWaitForMultipleObjects failed, status = %x\n", Status);
355 KeBugCheck(MEMORY_MANAGEMENT);
356 }
357 }
358}
#define InterlockedDecrement
Definition: armddk.h:52
LONG NTSTATUS
Definition: precomp.h:26
#define DPRINT1
Definition: precomp.h:8
DECLSPEC_NORETURN VOID NTAPI KeBugCheck(ULONG BugCheckCode)
Definition: bug.c:1431
#define NULL
Definition: types.h:112
#define FALSE
Definition: types.h:117
Status
Definition: gdiplustypes.h:25
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define KernelMode
Definition: asm.h:34
@ WaitAny
#define MC_MAXIMUM
Definition: mm.h:116
NTSTATUS NTAPI KeWaitForMultipleObjects(IN ULONG Count, IN PVOID Object[], IN WAIT_TYPE WaitType, IN KWAIT_REASON WaitReason, IN KPROCESSOR_MODE WaitMode, IN BOOLEAN Alertable, IN PLARGE_INTEGER Timeout OPTIONAL, OUT PKWAIT_BLOCK WaitBlockArray OPTIONAL)
Definition: wait.c:586
static KTIMER MiBalancerTimer
Definition: balance.c:36
static KEVENT MiBalancerEvent
Definition: balance.c:35
ULONG NTAPI MiTrimMemoryConsumer(ULONG Consumer, ULONG InitialTarget)
Definition: balance.c:97
static LONG PageOutThreadActive
Definition: balance.c:38
#define STATUS_WAIT_0
Definition: ntstatus.h:237
#define STATUS_WAIT_1
Definition: ntstatus.h:71
uint32_t ULONG
Definition: typedefs.h:59
@ Executive
Definition: ketypes.h:403

Referenced by MiInitBalancerThread().

◆ MiInitBalancerThread()

VOID NTAPI MiInitBalancerThread ( VOID  )

Definition at line 363 of file balance.c.

364{
368
371
372 Timeout.QuadPart = -20000000; /* 2 sec */
374 Timeout,
375 2000, /* 2 sec */
376 NULL);
377
380 NULL,
381 NULL,
384 NULL);
385 if (!NT_SUCCESS(Status))
386 {
387 KeBugCheck(MEMORY_MANAGEMENT);
388 }
389
393 &Priority,
394 sizeof(Priority));
395
396}
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
@ ThreadPriority
Definition: compat.h:937
LONG KPRIORITY
Definition: compat.h:803
#define KeInitializeEvent(pEvt, foo, foo2)
Definition: env_spec_w32.h:477
#define LOW_REALTIME_PRIORITY
#define THREAD_ALL_ACCESS
Definition: nt_native.h:1339
@ SynchronizationEvent
@ SynchronizationTimer
static HANDLE MiBalancerThreadHandle
Definition: balance.c:34
static CLIENT_ID MiBalancerThreadId
Definition: balance.c:33
VOID NTAPI MiBalancerThread(PVOID Unused)
Definition: balance.c:305
NTSTATUS NTAPI NtSetInformationThread(IN HANDLE ThreadHandle, IN THREADINFOCLASS ThreadInformationClass, IN PVOID ThreadInformation, IN ULONG ThreadInformationLength)
Definition: query.c:2018
NTSTATUS NTAPI PsCreateSystemThread(OUT PHANDLE ThreadHandle, IN ACCESS_MASK DesiredAccess, IN POBJECT_ATTRIBUTES ObjectAttributes, IN HANDLE ProcessHandle, IN PCLIENT_ID ClientId, IN PKSTART_ROUTINE StartRoutine, IN PVOID StartContext)
Definition: thread.c:602
static ULONG Timeout
Definition: ping.c:61
BOOLEAN NTAPI KeSetTimerEx(IN OUT PKTIMER Timer, IN LARGE_INTEGER DueTime, IN LONG Period, IN PKDPC Dpc OPTIONAL)
Definition: timerobj.c:294
VOID NTAPI KeInitializeTimerEx(OUT PKTIMER Timer, IN TIMER_TYPE Type)
Definition: timerobj.c:244
_In_ WDFINTERRUPT _In_ WDF_INTERRUPT_POLICY _In_ WDF_INTERRUPT_PRIORITY Priority
Definition: wdfinterrupt.h:655

Referenced by MmInitSystem().

◆ MiTrimMemoryConsumer()

ULONG NTAPI MiTrimMemoryConsumer ( ULONG  Consumer,
ULONG  InitialTarget 
)

Definition at line 97 of file balance.c.

98{
99 ULONG Target = InitialTarget;
100 ULONG NrFreedPages = 0;
102
103 /* Make sure we can trim this consumer */
104 if (!MiMemoryConsumers[Consumer].Trim)
105 {
106 /* Return the unmodified initial target */
107 return InitialTarget;
108 }
109
111 {
112 /* Global page limit exceeded */
114 }
115 else if (MiMemoryConsumers[Consumer].PagesUsed > MiMemoryConsumers[Consumer].PagesTarget)
116 {
117 /* Consumer page limit exceeded */
118 Target = max(Target, MiMemoryConsumers[Consumer].PagesUsed - MiMemoryConsumers[Consumer].PagesTarget);
119 }
120
121 if (Target)
122 {
123 /* Now swap the pages out */
125
126 DPRINT("Trimming consumer %lu: Freed %lu pages with a target of %lu pages\n", Consumer, NrFreedPages, Target);
127
128 if (!NT_SUCCESS(Status))
129 {
130 KeBugCheck(MEMORY_MANAGEMENT);
131 }
132 }
133
134 /* Return the page count needed to be freed to meet the initial target */
135 return (InitialTarget > NrFreedPages) ? (InitialTarget - NrFreedPages) : 0;
136}
PFN_NUMBER MmAvailablePages
Definition: freelist.c:26
MM_MEMORY_CONSUMER MiMemoryConsumers[MC_MAXIMUM]
Definition: balance.c:30
static ULONG MiMinimumAvailablePages
Definition: balance.c:31
#define DPRINT
Definition: sndvol32.h:71
NTSTATUS(* Trim)(ULONG Target, ULONG Priority, PULONG NrFreed)
Definition: mm.h:459
#define max(a, b)
Definition: svc.c:63
_In_ WDFIOTARGET Target
Definition: wdfrequest.h:306

Referenced by MiBalancerThread().

◆ MiZeroPhysicalPage()

VOID NTAPI MiZeroPhysicalPage ( IN PFN_NUMBER  PageFrameIndex)

Definition at line 122 of file pfnlist.c.

123{
127
128 /* Map in hyperspace, then wipe it using XMMI or MEMSET */
133}
UCHAR KIRQL
Definition: env_spec_w32.h:591
#define PAGE_SIZE
Definition: env_spec_w32.h:49
_Must_inspect_result_ _In_ PLARGE_INTEGER _In_ PLARGE_INTEGER _In_ ULONG _In_ PFILE_OBJECT _In_ PVOID Process
Definition: fsrtlfuncs.h:223
#define ASSERT(a)
Definition: mode.c:44
VOID FASTCALL KeZeroPages(IN PVOID Address, IN ULONG Size)
Definition: cpu.c:56
VOID NTAPI MiUnmapPageInHyperSpace(IN PEPROCESS Process, IN PVOID Address, IN KIRQL OldIrql)
Definition: hypermap.c:91
PVOID NTAPI MiMapPageInHyperSpace(IN PEPROCESS Process, IN PFN_NUMBER Page, IN PKIRQL OldIrql)
Definition: hypermap.c:28
_Must_inspect_result_ _In_ WDFDMATRANSACTION _In_ PFN_WDF_PROGRAM_DMA _In_ WDF_DMA_DIRECTION _In_ PMDL _In_ PVOID VirtualAddress
_Requires_lock_held_ Interrupt _Releases_lock_ Interrupt _In_ _IRQL_restores_ KIRQL OldIrql
Definition: kefuncs.h:792
#define PsGetCurrentProcess
Definition: psfuncs.h:17

Referenced by MiRemoveZeroPage().

◆ MmInitializeBalancer()

VOID NTAPI MmInitializeBalancer ( ULONG  NrAvailablePages,
ULONG  NrSystemPages 
)

Definition at line 45 of file balance.c.

46{
48
49 /* Set up targets. */
52 MiMemoryConsumers[MC_USER].PagesTarget = NrAvailablePages / 2;
53}
#define MC_USER
Definition: mm.h:114
static ULONG MiMinimumPagesPerRun
Definition: balance.c:32
#define memset(x, y, z)
Definition: compat.h:39
ULONG PagesTarget
Definition: mm.h:458

Referenced by MiInitMachineDependent().

◆ MmInitializeMemoryConsumer()

VOID NTAPI MmInitializeMemoryConsumer ( ULONG  Consumer,
NTSTATUS(*)(ULONG Target, ULONG Priority, PULONG NrFreed)  Trim 
)

Definition at line 58 of file balance.c.

61{
62 MiMemoryConsumers[Consumer].Trim = Trim;
63}

Referenced by MmInitSystem().

◆ MmRebalanceMemoryConsumers()

VOID NTAPI MmRebalanceMemoryConsumers ( VOID  )

Definition at line 271 of file balance.c.

272{
273 // if (InterlockedCompareExchange(&PageOutThreadActive, 0, 1) == 0)
274 {
276 }
277}
#define KeSetEvent(pEvt, foo, foo2)
Definition: env_spec_w32.h:476
#define IO_NO_INCREMENT
Definition: iotypes.h:598

Referenced by MiDecrementAvailablePages().

◆ MmReleasePageMemoryConsumer()

NTSTATUS NTAPI MmReleasePageMemoryConsumer ( ULONG  Consumer,
PFN_NUMBER  Page 
)

Definition at line 73 of file balance.c.

74{
76
77 if (Page == 0)
78 {
79 DPRINT1("Tried to release page zero.\n");
80 KeBugCheck(MEMORY_MANAGEMENT);
81 }
82
83 (void)InterlockedDecrementUL(&MiMemoryConsumers[Consumer].PagesUsed);
85
86 OldIrql = MiAcquirePfnLock();
87
89
90 MiReleasePfnLock(OldIrql);
91
92 return(STATUS_SUCCESS);
93}
#define InterlockedDecrementUL(Addend)
Definition: ex.h:1523
VOID NTAPI MmDereferencePage(PFN_NUMBER Page)
Definition: freelist.c:565
VOID UpdateTotalCommittedPages(LONG Delta)
Definition: mm.h:871
_In_ PVOID _Out_opt_ BOOLEAN _Out_opt_ PPFN_NUMBER Page
Definition: mm.h:1298
#define STATUS_SUCCESS
Definition: shellext.h:65

Referenced by FreeSegmentPage(), if(), MiFreeSegmentPage(), MiGetOnePage(), MiPurgeImageSegment(), MiReadFilePage(), MmCreateProcessAddressSpace(), MmDeleteVirtualMapping(), MmFinalizeSectionPageOut(), MmFreeCacheSectionPage(), MmFreePageTable(), MmFreeSectionPage(), MmGetPageTableForProcess(), MmGetPageTableForProcessForPAE(), MmMakeSegmentResident(), MmPageOutCacheSection(), MmPageOutPhysicalAddress(), MmpFreePageFileSegment(), MmPurgeSegment(), and MmUnsharePageEntrySectionSegment().

◆ MmRequestPageMemoryConsumer()

NTSTATUS NTAPI MmRequestPageMemoryConsumer ( ULONG  Consumer,
BOOLEAN  CanWait,
PPFN_NUMBER  AllocatedPage 
)

Definition at line 281 of file balance.c.

283{
285
286 /* Update the target */
287 InterlockedIncrementUL(&MiMemoryConsumers[Consumer].PagesUsed);
289
290 /*
291 * Actually allocate the page.
292 */
293 Page = MmAllocPage(Consumer);
294 if (Page == 0)
295 {
296 KeBugCheck(NO_PAGES_AVAILABLE);
297 }
298 *AllocatedPage = Page;
299
300 return(STATUS_SUCCESS);
301}
#define InterlockedIncrementUL(Addend)
Definition: ex.h:1526
PFN_NUMBER NTAPI MmAllocPage(ULONG Consumer)
Definition: freelist.c:601
ULONG PFN_NUMBER
Definition: ke.h:9

Referenced by CcInitCacheZeroPage(), MiGetOnePage(), MiGetPageTableForProcess(), MiReadFilePage(), MiSwapInPage(), MmAccessFaultSectionView(), MmCreateProcessAddressSpace(), MmGetPageTableForProcess(), MmGetPageTableForProcessForPAE(), MmMakeSegmentResident(), and MmNotPresentFaultSectionView().

◆ MmTrimUserMemory()

NTSTATUS MmTrimUserMemory ( ULONG  Target,
ULONG  Priority,
PULONG  NrFreedPages 
)

Definition at line 139 of file balance.c.

140{
141 PFN_NUMBER CurrentPage;
143
144 (*NrFreedPages) = 0;
145
146 DPRINT1("MM BALANCER: %s\n", Priority ? "Paging out!" : "Removing access bit!");
147
148 CurrentPage = MmGetLRUFirstUserPage();
149 while (CurrentPage != 0 && Target > 0)
150 {
151 if (Priority)
152 {
153 Status = MmPageOutPhysicalAddress(CurrentPage);
154 if (NT_SUCCESS(Status))
155 {
156 DPRINT("Succeeded\n");
157 Target--;
158 (*NrFreedPages)++;
159 }
160 }
161 else
162 {
163 /* When not paging-out agressively, just reset the accessed bit */
166 BOOLEAN Accessed = FALSE;
167
168 /*
169 * We have a lock-ordering problem here. We cant lock the PFN DB before the Process address space.
170 * So we must use circonvoluted loops.
171 * Well...
172 */
173 while (TRUE)
174 {
176 KIRQL OldIrql = MiAcquirePfnLock();
178 while (Entry)
179 {
180 if (RMAP_IS_SEGMENT(Entry->Address))
181 {
182 Entry = Entry->Next;
183 continue;
184 }
185
186 /* Check that we didn't treat this entry before */
187 if (Entry->Address < Address)
188 {
189 Entry = Entry->Next;
190 continue;
191 }
192
193 if ((Entry->Address == Address) && (Entry->Process <= Process))
194 {
195 Entry = Entry->Next;
196 continue;
197 }
198
199 break;
200 }
201
202 if (!Entry)
203 {
204 MiReleasePfnLock(OldIrql);
205 break;
206 }
207
208 Process = Entry->Process;
209 Address = Entry->Address;
210
212
213 if (!ExAcquireRundownProtection(&Process->RundownProtect))
214 {
216 MiReleasePfnLock(OldIrql);
217 continue;
218 }
219
220 MiReleasePfnLock(OldIrql);
221
224
225 /* Be sure this is still valid. */
227 {
229 Accessed = Accessed || Pte->u.Hard.Accessed;
230 Pte->u.Hard.Accessed = 0;
231
232 /* There is no need to invalidate, the balancer thread is never on a user process */
233 //KeInvalidateTlbEntry(Address);
234 }
235
237
239 ExReleaseRundownProtection(&Process->RundownProtect);
241 }
242
243 if (!Accessed)
244 {
245 /* Nobody accessed this page since the last time we check. Time to clean up */
246
247 Status = MmPageOutPhysicalAddress(CurrentPage);
248 // DPRINT1("Paged-out one page: %s\n", NT_SUCCESS(Status) ? "Yes" : "No");
249 (void)Status;
250 }
251
252 /* Done for this page. */
253 Target--;
254 }
255
256 CurrentPage = MmGetLRUNextUserPage(CurrentPage, TRUE);
257 }
258
259 if (CurrentPage)
260 {
261 KIRQL OldIrql = MiAcquirePfnLock();
262 MmDereferencePage(CurrentPage);
263 MiReleasePfnLock(OldIrql);
264 }
265
266 return STATUS_SUCCESS;
267}
unsigned char BOOLEAN
#define TRUE
Definition: types.h:120
#define PsGetCurrentThread()
Definition: env_spec_w32.h:81
#define ExReleaseRundownProtection
Definition: ex.h:135
#define ExAcquireRundownProtection
Definition: ex.h:134
FORCEINLINE VOID MiUnlockProcessWorkingSet(IN PEPROCESS Process, IN PETHREAD Thread)
Definition: miarm.h:1194
FORCEINLINE VOID MiLockProcessWorkingSet(IN PEPROCESS Process, IN PETHREAD Thread)
Definition: miarm.h:1124
BOOLEAN NTAPI MmIsAddressValid(IN PVOID VirtualAddress)
Definition: mmsup.c:174
#define MiAddressToPte(x)
Definition: mmx86.c:19
struct _MM_RMAP_ENTRY *NTAPI MmGetRmapListHeadPage(PFN_NUMBER Page)
Definition: freelist.c:458
#define RMAP_IS_SEGMENT(x)
Definition: mm.h:940
PFN_NUMBER NTAPI MmGetLRUFirstUserPage(VOID)
Definition: freelist.c:45
_Out_ PKAPC_STATE ApcState
Definition: mm.h:1727
PFN_NUMBER NTAPI MmGetLRUNextUserPage(PFN_NUMBER PreviousPage, BOOLEAN MoveToLast)
Definition: freelist.c:125
NTSTATUS NTAPI MmPageOutPhysicalAddress(PFN_NUMBER Page)
Definition: rmap.c:51
static WCHAR Address[46]
Definition: ping.c:68
VOID NTAPI KeStackAttachProcess(IN PKPROCESS Process, OUT PRKAPC_STATE ApcState)
Definition: procobj.c:704
VOID NTAPI KeUnstackDetachProcess(IN PRKAPC_STATE ApcState)
Definition: procobj.c:756
base of all file and directory entries
Definition: entries.h:83
ULONG64 Accessed
Definition: mmtypes.h:163
MMPTE_HARDWARE Hard
Definition: mmtypes.h:217
union _MMPTE::@2307 u
Definition: mm.h:266
KAPC_STATE
Definition: ketypes.h:1285
#define ObDereferenceObject
Definition: obfuncs.h:203
#define ObReferenceObject
Definition: obfuncs.h:204

Referenced by MmInitSystem().

Variable Documentation

◆ MiBalancerEvent

KEVENT MiBalancerEvent
static

Definition at line 35 of file balance.c.

Referenced by MiBalancerThread(), MiInitBalancerThread(), and MmRebalanceMemoryConsumers().

◆ MiBalancerThreadHandle

HANDLE MiBalancerThreadHandle = NULL
static

Definition at line 34 of file balance.c.

Referenced by MiInitBalancerThread().

◆ MiBalancerThreadId

CLIENT_ID MiBalancerThreadId
static

Definition at line 33 of file balance.c.

Referenced by MiInitBalancerThread().

◆ MiBalancerTimer

KTIMER MiBalancerTimer
static

Definition at line 36 of file balance.c.

Referenced by MiBalancerThread(), and MiInitBalancerThread().

◆ MiMemoryConsumers

◆ MiMinimumAvailablePages

ULONG MiMinimumAvailablePages
static

Definition at line 31 of file balance.c.

Referenced by MiTrimMemoryConsumer(), and MmInitializeBalancer().

◆ MiMinimumPagesPerRun

ULONG MiMinimumPagesPerRun
static

Definition at line 32 of file balance.c.

Referenced by MmInitializeBalancer().

◆ PageOutThreadActive

LONG PageOutThreadActive
static

Definition at line 38 of file balance.c.

Referenced by MiBalancerThread().