ReactOS  0.4.15-dev-2354-g9e947e2
balance.c
Go to the documentation of this file.
1 /*
2  * COPYRIGHT: See COPYING in the top level directory
3  * PROJECT: ReactOS kernel
4  * FILE: ntoskrnl/mm/balance.c
5  * PURPOSE: kernel memory managment functions
6  *
7  * PROGRAMMERS: David Welch (welch@cwcom.net)
8  * Cameron Gutman (cameron.gutman@reactos.org)
9  */
10 
11 /* INCLUDES *****************************************************************/
12 
13 #include <ntoskrnl.h>
14 #define NDEBUG
15 #include <debug.h>
16 
17 #include "ARM3/miarm.h"
18 
19 /* TYPES ********************************************************************/
20 typedef struct _MM_ALLOCATION_REQUEST
21 {
25 }
27 /* GLOBALS ******************************************************************/
28 
34 
39 
41 
42 /* FUNCTIONS ****************************************************************/
43 
44 CODE_SEG("INIT")
45 VOID
46 NTAPI
47 MmInitializeBalancer(ULONG NrAvailablePages, ULONG NrSystemPages)
48 {
52 
53  /* Set up targets. */
56  MiMemoryConsumers[MC_USER].PagesTarget = NrAvailablePages / 2;
57 }
58 
59 CODE_SEG("INIT")
60 VOID
61 NTAPI
63  ULONG Consumer,
64  NTSTATUS (*Trim)(ULONG Target, ULONG Priority, PULONG NrFreed))
65 {
66  MiMemoryConsumers[Consumer].Trim = Trim;
67 }
68 
69 VOID
70 NTAPI
72  IN PFN_NUMBER PageFrameIndex
73 );
74 
76 NTAPI
78 {
79  if (Page == 0)
80  {
81  DPRINT1("Tried to release page zero.\n");
82  KeBugCheck(MEMORY_MANAGEMENT);
83  }
84 
85  (void)InterlockedDecrementUL(&MiMemoryConsumers[Consumer].PagesUsed);
86 
88 
89  return(STATUS_SUCCESS);
90 }
91 
92 ULONG
93 NTAPI
94 MiTrimMemoryConsumer(ULONG Consumer, ULONG InitialTarget)
95 {
96  ULONG Target = InitialTarget;
97  ULONG NrFreedPages = 0;
99 
100  /* Make sure we can trim this consumer */
101  if (!MiMemoryConsumers[Consumer].Trim)
102  {
103  /* Return the unmodified initial target */
104  return InitialTarget;
105  }
106 
108  {
109  /* Global page limit exceeded */
111  }
112  else if (MiMemoryConsumers[Consumer].PagesUsed > MiMemoryConsumers[Consumer].PagesTarget)
113  {
114  /* Consumer page limit exceeded */
115  Target = max(Target, MiMemoryConsumers[Consumer].PagesUsed - MiMemoryConsumers[Consumer].PagesTarget);
116  }
117 
118  if (Target)
119  {
120  /* Now swap the pages out */
122 
123  DPRINT("Trimming consumer %lu: Freed %lu pages with a target of %lu pages\n", Consumer, NrFreedPages, Target);
124 
125  if (!NT_SUCCESS(Status))
126  {
127  KeBugCheck(MEMORY_MANAGEMENT);
128  }
129  }
130 
131  /* Return the page count needed to be freed to meet the initial target */
132  return (InitialTarget > NrFreedPages) ? (InitialTarget - NrFreedPages) : 0;
133 }
134 
135 NTSTATUS
137 {
138  PFN_NUMBER CurrentPage;
140 
141  (*NrFreedPages) = 0;
142 
143  DPRINT1("MM BALANCER: %s\n", Priority ? "Paging out!" : "Removing access bit!");
144 
145  CurrentPage = MmGetLRUFirstUserPage();
146  while (CurrentPage != 0 && Target > 0)
147  {
148  if (Priority)
149  {
150  Status = MmPageOutPhysicalAddress(CurrentPage);
151  if (NT_SUCCESS(Status))
152  {
153  DPRINT("Succeeded\n");
154  Target--;
155  (*NrFreedPages)++;
156  }
157  }
158  else
159  {
160  /* When not paging-out agressively, just reset the accessed bit */
162  PVOID Address = NULL;
163  BOOLEAN Accessed = FALSE;
164 
165  /*
166  * We have a lock-ordering problem here. We cant lock the PFN DB before the Process address space.
167  * So we must use circonvoluted loops.
168  * Well...
169  */
170  while (TRUE)
171  {
175  while (Entry)
176  {
177  if (RMAP_IS_SEGMENT(Entry->Address))
178  {
179  Entry = Entry->Next;
180  continue;
181  }
182 
183  /* Check that we didn't treat this entry before */
184  if (Entry->Address < Address)
185  {
186  Entry = Entry->Next;
187  continue;
188  }
189 
190  if ((Entry->Address == Address) && (Entry->Process <= Process))
191  {
192  Entry = Entry->Next;
193  continue;
194  }
195 
196  break;
197  }
198 
199  if (!Entry)
200  {
202  break;
203  }
204 
205  Process = Entry->Process;
206  Address = Entry->Address;
207 
209 
211 
213 
214  /* Be sure this is still valid. */
216  if (Pte->u.Hard.Valid)
217  {
218  Accessed = Accessed || Pte->u.Hard.Accessed;
219  Pte->u.Hard.Accessed = 0;
220 
221  /* There is no need to invalidate, the balancer thread is never on a user process */
222  //KeInvalidateTlbEntry(Address);
223  }
224 
226 
228  }
229 
230  if (!Accessed)
231  {
232  /* Nobody accessed this page since the last time we check. Time to clean up */
233 
234  Status = MmPageOutPhysicalAddress(CurrentPage);
235  // DPRINT1("Paged-out one page: %s\n", NT_SUCCESS(Status) ? "Yes" : "No");
236  (void)Status;
237  }
238 
239  /* Done for this page. */
240  Target--;
241  }
242 
243  CurrentPage = MmGetLRUNextUserPage(CurrentPage, TRUE);
244  }
245 
246  if (CurrentPage)
247  {
249  MmDereferencePage(CurrentPage);
251  }
252 
253  return STATUS_SUCCESS;
254 }
255 
256 static BOOLEAN
258 {
259  return (MiBalancerThreadHandle != NULL) &&
261 }
262 
263 VOID
264 NTAPI
266 {
267  // if (InterlockedCompareExchange(&PageOutThreadActive, 0, 1) == 0)
268  {
270  }
271 }
272 
273 NTSTATUS
274 NTAPI
276  PPFN_NUMBER AllocatedPage)
277 {
279 
280  /* Update the target */
281  InterlockedIncrementUL(&MiMemoryConsumers[Consumer].PagesUsed);
282 
283  /*
284  * Actually allocate the page.
285  */
286  Page = MmAllocPage(Consumer);
287  if (Page == 0)
288  {
289  KeBugCheck(NO_PAGES_AVAILABLE);
290  }
291  *AllocatedPage = Page;
292 
293  return(STATUS_SUCCESS);
294 }
295 
296 
297 VOID NTAPI
299 {
300  PVOID WaitObjects[2];
302  ULONG i;
303 
304  WaitObjects[0] = &MiBalancerEvent;
305  WaitObjects[1] = &MiBalancerTimer;
306 
307  while (1)
308  {
310  WaitObjects,
311  WaitAny,
312  Executive,
313  KernelMode,
314  FALSE,
315  NULL,
316  NULL);
317 
319  {
320  ULONG InitialTarget = 0;
321 
322 #if (_MI_PAGING_LEVELS == 2)
323  if (!MiIsBalancerThread())
324  {
325  /* Clean up the unused PDEs */
328 
329  /* Acquire PFN lock */
331  PMMPDE pointerPde;
335  {
337  {
338  pointerPde = MiAddressToPde(Address);
339  if (pointerPde->u.Hard.Valid)
340  MiDeletePte(pointerPde, MiPdeToPte(pointerPde), Process, NULL);
341  ASSERT(pointerPde->u.Hard.Valid == 0);
342  }
343  }
344  /* Release lock */
346  }
347 #endif
348  do
349  {
350  ULONG OldTarget = InitialTarget;
351 
352  /* Trim each consumer */
353  for (i = 0; i < MC_MAXIMUM; i++)
354  {
355  InitialTarget = MiTrimMemoryConsumer(i, InitialTarget);
356  }
357 
358  /* No pages left to swap! */
359  if (InitialTarget != 0 &&
360  InitialTarget == OldTarget)
361  {
362  /* Game over */
363  KeBugCheck(NO_PAGES_AVAILABLE);
364  }
365  }
366  while (InitialTarget != 0);
367 
368  if (Status == STATUS_WAIT_0)
370  }
371  else
372  {
373  DPRINT1("KeWaitForMultipleObjects failed, status = %x\n", Status);
374  KeBugCheck(MEMORY_MANAGEMENT);
375  }
376  }
377 }
378 
380 {
383  PMMPFN Pfn1;
384 
385  /* Make sure the PFN lock is held */
387 
389  {
390  /* Dirty way to know if we were initialized. */
391  return FALSE;
392  }
393 
395  if (!Entry)
396  return FALSE;
397 
400  Request->Page = Page;
401 
402  Pfn1 = MiGetPfnEntry(Page);
403  ASSERT(Pfn1->u3.e2.ReferenceCount == 0);
404  Pfn1->u3.e2.ReferenceCount = 1;
406 
407  /* This marks the PFN as a ReactOS PFN */
408  Pfn1->u4.AweAllocation = TRUE;
409 
410  /* Allocate the extra ReactOS Data and zero it out */
411  Pfn1->u1.SwapEntry = 0;
412  Pfn1->RmapListHead = NULL;
413 
415 
416  return TRUE;
417 }
418 
419 CODE_SEG("INIT")
420 VOID
421 NTAPI
423 {
427 
430 
431  Timeout.QuadPart = -20000000; /* 2 sec */
433  Timeout,
434  2000, /* 2 sec */
435  NULL);
436 
439  NULL,
440  NULL,
443  NULL);
444  if (!NT_SUCCESS(Status))
445  {
446  KeBugCheck(MEMORY_MANAGEMENT);
447  }
448 
452  &Priority,
453  sizeof(Priority));
454 
455 }
456 
457 
458 /* EOF */
VOID NTAPI MmDereferencePage(PFN_NUMBER Page)
Definition: freelist.c:566
VOID NTAPI MmRebalanceMemoryConsumers(VOID)
Definition: balance.c:265
PFN_NUMBER Page
Definition: balance.c:22
static LIST_ENTRY AllocationListHead
Definition: balance.c:31
VOID NTAPI MmInitializeMemoryConsumer(ULONG Consumer, NTSTATUS(*Trim)(ULONG Target, ULONG Priority, PULONG NrFreed))
Definition: balance.c:62
_Must_inspect_result_ typedef _In_ PVOID Unused
Definition: iotypes.h:1166
#define IN
Definition: typedefs.h:39
#define max(a, b)
Definition: svc.c:63
#define THREAD_ALL_ACCESS
Definition: nt_native.h:1339
KAPC_STATE
Definition: ketypes.h:1280
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:49
#define MI_ASSERT_PFN_LOCK_HELD()
Definition: mm.h:954
#define MiAddressToPde(x)
Definition: mmx86.c:20
static ULONG MiMinimumPagesPerRun
Definition: balance.c:33
struct _Entry Entry
Definition: kefuncs.h:627
union _MMPTE::@2304 u
VOID NTAPI MiBalancerThread(PVOID Unused)
Definition: balance.c:298
#define TRUE
Definition: types.h:120
#define MC_USER
Definition: mm.h:92
#define MI_LOWEST_VAD_ADDRESS
Definition: miarm.h:11
struct _MM_RMAP_ENTRY *NTAPI MmGetRmapListHeadPage(PFN_NUMBER Page)
Definition: freelist.c:458
ULONG_PTR AweAllocation
Definition: mm.h:389
ULONG PagesTarget
Definition: mm.h:425
LIST_ENTRY ListEntry
Definition: balance.c:23
struct _MMPFN::@1778::@1784 e2
FORCEINLINE VOID MmUnlockAddressSpace(PMMSUPPORT AddressSpace)
Definition: mm.h:1541
PMM_RMAP_ENTRY RmapListHead
Definition: mm.h:379
LONG NTSTATUS
Definition: precomp.h:26
BOOLEAN MmRosNotifyAvailablePage(PFN_NUMBER Page)
Definition: balance.c:379
struct _MM_ALLOCATION_REQUEST MM_ALLOCATION_REQUEST
FORCEINLINE KIRQL MiAcquirePfnLock(VOID)
Definition: mm.h:919
FORCEINLINE USHORT MiQueryPageTableReferences(IN PVOID Address)
Definition: miarm.h:1696
#define LOW_REALTIME_PRIORITY
_In_ WDFREQUEST Request
Definition: wdfdevice.h:547
VOID NTAPI MmInitializeBalancer(ULONG NrAvailablePages, ULONG NrSystemPages)
Definition: balance.c:47
BOOLEAN NTAPI KeSetTimerEx(IN OUT PKTIMER Timer, IN LARGE_INTEGER DueTime, IN LONG Period, IN PKDPC Dpc OPTIONAL)
Definition: timerobj.c:294
PFN_NUMBER MmAvailablePages
Definition: freelist.c:26
LONG NTAPI KeSetEvent(IN PKEVENT Event, IN KPRIORITY Increment, IN BOOLEAN Wait)
Definition: eventobj.c:159
union _MMPFN::@1781 u4
FORCEINLINE VOID MiReleasePfnLock(_In_ KIRQL OldIrql)
Definition: mm.h:926
LONG KPRIORITY
Definition: compat.h:662
union _MMPFN::@1778 u3
USHORT PageLocation
Definition: mm.h:333
VOID NTAPI MiDeletePte(IN PMMPTE PointerPte, IN PVOID VirtualAddress, IN PEPROCESS CurrentProcess, IN PMMPTE PrototypePte)
Definition: virtual.c:391
uint32_t ULONG_PTR
Definition: typedefs.h:65
static KEVENT MiBalancerEvent
Definition: balance.c:37
static LONG PageOutThreadActive
Definition: balance.c:40
UCHAR KIRQL
Definition: env_spec_w32.h:591
MMPFNENTRY e1
Definition: mm.h:365
#define STATUS_WAIT_1
Definition: ntstatus.h:71
ULONG * PPFN_NUMBER
Definition: ke.h:9
#define MiAddressToPte(x)
Definition: mmx86.c:19
#define STATUS_WAIT_0
Definition: ntstatus.h:237
#define MC_MAXIMUM
Definition: mm.h:94
union _MMPFN::@1776 u1
ULONG PFN_NUMBER
Definition: ke.h:9
PFN_NUMBER NTAPI MmGetLRUNextUserPage(PFN_NUMBER PreviousPage, BOOLEAN MoveToLast)
Definition: freelist.c:125
NTSTATUS(* NTAPI)(IN PFILE_FULL_EA_INFORMATION EaBuffer, IN ULONG EaLength, OUT PULONG ErrorOffset)
Definition: IoEaTest.cpp:117
#define FALSE
Definition: types.h:117
VOID NTAPI KeStackAttachProcess(IN PKPROCESS Process, OUT PRKAPC_STATE ApcState)
Definition: procobj.c:701
DECLSPEC_NORETURN VOID NTAPI KeBugCheck(ULONG BugCheckCode)
Definition: bug.c:1427
long LONG
Definition: pedump.c:60
static CLIENT_ID MiBalancerThreadId
Definition: balance.c:35
#define PsGetCurrentProcess
Definition: psfuncs.h:17
FORCEINLINE VOID KeInitializeSpinLock(_Out_ PKSPIN_LOCK SpinLock)
Definition: kefuncs.h:238
PLIST_ENTRY NTAPI ExInterlockedRemoveHeadList(IN OUT PLIST_ENTRY ListHead, IN OUT PKSPIN_LOCK Lock)
Definition: interlocked.c:166
unsigned char BOOLEAN
struct _MM_ALLOCATION_REQUEST * PMM_ALLOCATION_REQUEST
static WCHAR Address[46]
Definition: ping.c:68
NTSTATUS NTAPI MmPageOutPhysicalAddress(PFN_NUMBER Page)
Definition: rmap.c:51
PsGetCurrentThreadId
Definition: CrNtStubs.h:7
PFN_NUMBER Page
Definition: section.c:4756
NTSTATUS NTAPI NtSetInformationThread(IN HANDLE ThreadHandle, IN THREADINFOCLASS ThreadInformationClass, IN PVOID ThreadInformation, IN ULONG ThreadInformationLength)
Definition: query.c:2018
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560
Status
Definition: gdiplustypes.h:24
ULONG NTAPI MiTrimMemoryConsumer(ULONG Consumer, ULONG InitialTarget)
Definition: balance.c:94
#define ASSERT(a)
Definition: mode.c:45
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
NTSTATUS(* Trim)(ULONG Target, ULONG Priority, PULONG NrFreed)
Definition: mm.h:426
ULONG64 Valid
Definition: mmtypes.h:150
NTSTATUS NTAPI MmRequestPageMemoryConsumer(ULONG Consumer, BOOLEAN CanWait, PPFN_NUMBER AllocatedPage)
Definition: balance.c:275
#define PTE_PER_PAGE
Definition: mm.h:20
#define RMAP_IS_SEGMENT(x)
Definition: mm.h:865
CODE_SEG("INIT")
Definition: fsrtlpc.c:19
PFN_NUMBER NTAPI MmAllocPage(ULONG Consumer)
Definition: freelist.c:605
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
HANDLE UniqueThread
Definition: compat.h:685
_In_ WDFINTERRUPT _In_ WDF_INTERRUPT_POLICY _In_ WDF_INTERRUPT_PRIORITY Priority
Definition: wdfinterrupt.h:651
static KSPIN_LOCK AllocationListLock
Definition: balance.c:32
#define InterlockedDecrement
Definition: armddk.h:52
_Requires_lock_held_ Interrupt _Releases_lock_ Interrupt _In_ _IRQL_restores_ KIRQL OldIrql
Definition: kefuncs.h:790
MM_MEMORY_CONSUMER MiMemoryConsumers[MC_MAXIMUM]
Definition: balance.c:29
Definition: mm.h:341
#define InterlockedDecrementUL(Addend)
Definition: ex.h:1496
static BOOLEAN MiIsBalancerThread(VOID)
Definition: balance.c:257
#define PAGE_SIZE
Definition: env_spec_w32.h:49
Definition: typedefs.h:119
PFN_NUMBER NTAPI MmGetLRUFirstUserPage(VOID)
Definition: freelist.c:45
FORCEINLINE PMMPFN MiGetPfnEntry(IN PFN_NUMBER Pfn)
Definition: mm.h:958
NTSTATUS NTAPI MmReleasePageMemoryConsumer(ULONG Consumer, PFN_NUMBER Page)
Definition: balance.c:77
MMPTE_HARDWARE Hard
Definition: mmtypes.h:217
static ULONG Timeout
Definition: ping.c:61
#define MiPdeToPte(_Pde)
Definition: mm.h:235
#define KeInitializeEvent(pEvt, foo, foo2)
Definition: env_spec_w32.h:477
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
VOID NTAPI KeUnstackDetachProcess(IN PRKAPC_STATE ApcState)
Definition: procobj.c:753
#define InitializeListHead(ListHead)
Definition: env_spec_w32.h:944
#define InterlockedIncrementUL(Addend)
Definition: ex.h:1499
ULONG KSPIN_LOCK
Definition: env_spec_w32.h:72
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
_Out_ PKAPC_STATE ApcState
Definition: mm.h:1602
unsigned int * PULONG
Definition: retypes.h:1
#define NULL
Definition: types.h:112
SWAPENTRY SwapEntry
Definition: mm.h:352
_In_ WDFIOTARGET Target
Definition: wdfrequest.h:306
#define DPRINT1
Definition: precomp.h:8
#define MM_HIGHEST_VAD_ADDRESS
Definition: mm.h:46
VOID NTAPI MiZeroPhysicalPage(IN PFN_NUMBER PageFrameIndex)
Definition: pfnlist.c:122
_Must_inspect_result_ _In_ PLARGE_INTEGER _In_ PLARGE_INTEGER _In_ ULONG _In_ PFILE_OBJECT _In_ PVOID Process
Definition: fsrtlfuncs.h:219
VOID NTAPI MiInitBalancerThread(VOID)
Definition: balance.c:422
unsigned int ULONG
Definition: retypes.h:1
#define IO_NO_INCREMENT
Definition: iotypes.h:598
Definition: mm.h:233
#define ULONG_PTR
Definition: config.h:101
static HANDLE MiBalancerThreadHandle
Definition: balance.c:36
#define STATUS_SUCCESS
Definition: shellext.h:65
#define DPRINT
Definition: sndvol32.h:71
static ULONG MiMinimumAvailablePages
Definition: balance.c:30
#define memset(x, y, z)
Definition: compat.h:39
NTSTATUS MmTrimUserMemory(ULONG Target, ULONG Priority, PULONG NrFreedPages)
Definition: balance.c:136
FORCEINLINE VOID MmLockAddressSpace(PMMSUPPORT AddressSpace)
Definition: mm.h:1534
ULONG64 Accessed
Definition: mmtypes.h:163
base of all file and directory entries
Definition: entries.h:82
VOID NTAPI KeInitializeTimerEx(OUT PKTIMER Timer, IN TIMER_TYPE Type)
Definition: timerobj.c:244
static KTIMER MiBalancerTimer
Definition: balance.c:38