243{
245 PMMPTE StartPde, EndPde, PointerPte, LastPte;
247 PVOID NonPagedPoolExpansionVa;
248 SIZE_T NonPagedSystemSize;
252
253#if defined(_GLOBAL_PAGES_ARE_AWESOME_)
254
255
257 {
258
261 }
262
263#endif
264
265
268
269
270
271
275
276
277
278
282
283
285
286
287
288
294 DPRINT(
"NP Pool has been tuned to: %lu bytes and %lu bytes\n",
296
297
298
299
300
301
304 NonPagedSystemSize);
307
308
309
310
312 {
313
314
315
317
318
319
320
326 }
327
328
329
330
331
334 {
335
336
337
338 DPRINT1(
"Paged pool is too big!\n");
339 }
340
341
342
343
344
345
346
349
350
351
352
355
356
357
358
359
362 ASSERT(PageFrameIndex != 0);
363 DPRINT(
"PFN DB PA PFN begins at: %lx\n", PageFrameIndex);
365
366
368
369
370
371
372
375 while (StartPde <= EndPde)
376 {
377
378
379
382
383
384
385
388
389
390
391
392 StartPde++;
393 }
394
395
396
397
401 while (StartPde <= EndPde)
402 {
403
404
405
408
409
410
411
414
415
416
417
418 StartPde++;
419 }
420
422
423
424
425
427
428
429
430
434 while (PointerPte <= LastPte)
435 {
436
437
438
441 }
442
443
444
445
448
449
452
453
455
456
458
459
462
463
464
465
467
468
469
470
472
473
474
475
478 PointerPte;
480 DPRINT(
"Final System PTE count: %lu (%lu bytes)\n",
482
483
484
485
487
488
490
491
493
494
502
503
505
506
508
509
510
511
514
515
516
517
521
522
524
525
526
527
531
532
533
534
536
537
539
540
543 Pfn1->
u3.
e2.ReferenceCount = 0;
544
545
551
552
555
556
559
560
562 {
563
564
565
568 }
569
570
572
573
576
577
585
586
587 while (PointerPte <= LastPte)
588 {
589
591 if (!Pfn1->
u3.
e2.ReferenceCount)
592 {
593
597 Pfn1->
u3.
e2.ReferenceCount = 1;
600 }
601
602
603 PointerPte++;
604 }
605
606
608}
HARDWARE_PTE_ARMV6 TempPte
HARDWARE_PDE_ARMV6 TempPde
VOID NTAPI InitializePool(IN POOL_TYPE PoolType, IN ULONG Threshold)
PMMPTE MmLastReservedMappingPte
PMMPTE MiFirstReservedZeroingPte
PMMPTE MmFirstReservedMappingPte
VOID NTAPI MiInitializeSystemPtes(IN PMMPTE StartingPte, IN ULONG NumberOfPtes, IN MMSYSTEM_PTE_POOL_TYPE PoolType)
PFN_NUMBER MiNumberOfFreePages
VOID NTAPI MiInitializePfnDatabase(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
ULONG_PTR MmSubsectionBase
VOID NTAPI MiInitializeColorTables(VOID)
PFN_NUMBER NTAPI MxGetNextPage(IN PFN_NUMBER PageCount)
PFN_NUMBER NTAPI MiRemoveAnyPage(IN ULONG Color)
PFN_NUMBER MmMaximumNonPagedPoolInPages
VOID NTAPI MiInitializeNonPagedPoolThresholds(VOID)
PMMPTE NTAPI MiReserveSystemPtes(IN ULONG NumberOfPtes, IN MMSYSTEM_PTE_POOL_TYPE SystemPtePoolType)
VOID NTAPI MiMapPfnDatabase(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
FORCEINLINE VOID MI_WRITE_VALID_PTE(IN PMMPTE PointerPte, IN MMPTE TempPte)
SIZE_T MmSizeOfPagedPoolInBytes
PMMCOLOR_TABLES MmFreePagesByColor[FreePageList+1]
#define MiAddressToPde(x)
#define MI_MAPPING_RANGE_START
#define MI_HYPERSPACE_PTES
#define MI_MAPPING_RANGE_END
#define MI_WORKING_SET_LIST
#define MiPteToAddress(_Pte)
BOOLEAN KiI386PentiumLockErrataPresent
VOID NTAPI KeFlushCurrentTb(VOID)
FORCEINLINE PMMPFN MiGetPfnEntry(IN PFN_NUMBER Pfn)
#define MI_SET_PROCESS2(x)
NTSTATUS NTAPI MmInitializeProcessAddressSpace(IN PEPROCESS Process, IN PEPROCESS Clone OPTIONAL, IN PVOID Section OPTIONAL, IN OUT PULONG Flags, IN POBJECT_NAME_INFORMATION *AuditName OPTIONAL)
VOID NTAPI MiInitializeNonPagedPool(VOID)
VOID NTAPI MmInitializeBalancer(ULONG NrAvailablePages, ULONG NrSystemPages)
PFN_NUMBER MmAvailablePages
PVOID MmNonPagedSystemStart
PMEMORY_ALLOCATION_DESCRIPTOR MxFreeDescriptor
ULONG MmNumberOfSystemPtes
PVOID MmNonPagedPoolExpansionStart
MEMORY_ALLOCATION_DESCRIPTOR MxOldFreeDescriptor
PVOID MmNonPagedPoolStart
MMPTE ValidKernelPteLocal
MMPTE ValidKernelPdeLocal
VOID NTAPI MiComputeNonPagedPoolVa(IN ULONG FreePages)
struct _MMPFN::@1799::@1805 e2
#define RtlZeroMemory(Destination, Length)
_Must_inspect_result_ _In_ ULONG Flags
_Requires_lock_held_ Interrupt _Releases_lock_ Interrupt _In_ _IRQL_restores_ KIRQL OldIrql
#define PsGetCurrentProcess