ReactOS 0.4.16-dev-257-g6aa11ac
mm.h
Go to the documentation of this file.
1#pragma once
2
3#include <internal/arch/mm.h>
4
5#ifdef __cplusplus
6extern "C" {
7#endif
8
9/* TYPES *********************************************************************/
10
11struct _EPROCESS;
12
22extern ULONG MmThrottleTop;
24
26
28
30
33
39
48
49extern PVOID MiDebugMapping; // internal
50extern PMMPTE MmDebugPte; // internal
51
53
54struct _KTRAP_FRAME;
55struct _EPROCESS;
56struct _MM_RMAP_ENTRY;
58
59//
60// Pool Quota values
61//
62#define MI_QUOTA_NON_PAGED_NEEDED_PAGES 64
63#define MI_NON_PAGED_QUOTA_MIN_RESIDENT_PAGES 200
64#define MI_CHARGE_PAGED_POOL_QUOTA 0x80000
65#define MI_CHARGE_NON_PAGED_POOL_QUOTA 0x10000
66
67//
68// Special IRQL value (found in assertions)
69//
70#define MM_NOIRQL ((KIRQL)0xFFFFFFFF)
71
72//
73// MmDbgCopyMemory Flags
74//
75#define MMDBG_COPY_WRITE 0x00000001
76#define MMDBG_COPY_PHYSICAL 0x00000002
77#define MMDBG_COPY_UNSAFE 0x00000004
78#define MMDBG_COPY_CACHED 0x00000008
79#define MMDBG_COPY_UNCACHED 0x00000010
80#define MMDBG_COPY_WRITE_COMBINED 0x00000020
81
82//
83// Maximum chunk size per copy
84//
85#define MMDBG_COPY_MAX_SIZE 0x8
86
87#if defined(_X86_) // intenal for marea.c
88#define MI_STATIC_MEMORY_AREAS (14)
89#else
90#define MI_STATIC_MEMORY_AREAS (13)
91#endif
92
93#define MEMORY_AREA_SECTION_VIEW (1)
94#ifdef NEWCC
95#define MEMORY_AREA_CACHE (2)
96#endif
97#define MEMORY_AREA_OWNED_BY_ARM3 (15)
98#define MEMORY_AREA_STATIC (0x80000000)
99
100/* Although Microsoft says this isn't hardcoded anymore,
101 they won't be able to change it. Stuff depends on it */
102#define MM_VIRTMEM_GRANULARITY (64 * 1024)
103
104#define STATUS_MM_RESTART_OPERATION ((NTSTATUS)0xD0000001)
105
106/*
107 * Additional flags for protection attributes
108 */
109#define PAGE_WRITETHROUGH (1024)
110#define PAGE_SYSTEM (2048)
111
112#define SEC_PHYSICALMEMORY (0x80000000)
113
114#define MC_USER (0)
115#define MC_SYSTEM (1)
116#define MC_MAXIMUM (2)
117
118#define PAGED_POOL_MASK 1
119#define MUST_SUCCEED_POOL_MASK 2
120#define CACHE_ALIGNED_POOL_MASK 4
121#define QUOTA_POOL_MASK 8
122#define SESSION_POOL_MASK 32
123#define VERIFIER_POOL_MASK 64
124
125#define MAX_PAGING_FILES (16)
126
127// FIXME: use ALIGN_UP_BY
128#define MM_ROUND_UP(x,s) \
129 ((PVOID)(((ULONG_PTR)(x)+(s)-1) & ~((ULONG_PTR)(s)-1)))
130
131#define MM_ROUND_DOWN(x,s) \
132 ((PVOID)(((ULONG_PTR)(x)) & ~((ULONG_PTR)(s)-1)))
133
134#define PAGE_FLAGS_VALID_FOR_SECTION \
135 (PAGE_READONLY | \
136 PAGE_READWRITE | \
137 PAGE_WRITECOPY | \
138 PAGE_EXECUTE | \
139 PAGE_EXECUTE_READ | \
140 PAGE_EXECUTE_READWRITE | \
141 PAGE_EXECUTE_WRITECOPY | \
142 PAGE_NOACCESS | \
143 PAGE_NOCACHE)
144
145#define PAGE_IS_READABLE \
146 (PAGE_READONLY | \
147 PAGE_READWRITE | \
148 PAGE_WRITECOPY | \
149 PAGE_EXECUTE_READ | \
150 PAGE_EXECUTE_READWRITE | \
151 PAGE_EXECUTE_WRITECOPY)
152
153#define PAGE_IS_WRITABLE \
154 (PAGE_READWRITE | \
155 PAGE_WRITECOPY | \
156 PAGE_EXECUTE_READWRITE | \
157 PAGE_EXECUTE_WRITECOPY)
158
159#define PAGE_IS_EXECUTABLE \
160 (PAGE_EXECUTE | \
161 PAGE_EXECUTE_READ | \
162 PAGE_EXECUTE_READWRITE | \
163 PAGE_EXECUTE_WRITECOPY)
164
165#define PAGE_IS_WRITECOPY \
166 (PAGE_WRITECOPY | \
167 PAGE_EXECUTE_WRITECOPY)
168
169//
170// Wait entry for marking pages that are being serviced
171//
172#ifdef _M_IX86
173#define MM_WAIT_ENTRY 0x7ffffc00
174#elif defined(_M_AMD64)
175#define MM_WAIT_ENTRY 0x7FFFFFFFFFFFFC00ULL
176#else
177#error Unsupported architecture!
178#endif
179
180#ifdef _M_AMD64
181#define InterlockedCompareExchangePte(PointerPte, Exchange, Comperand) \
182 InterlockedCompareExchange64((PLONG64)(PointerPte), Exchange, Comperand)
183
184#define InterlockedExchangePte(PointerPte, Value) \
185 InterlockedExchange64((PLONG64)(PointerPte), Value)
186#else
187#define InterlockedCompareExchangePte(PointerPte, Exchange, Comperand) \
188 InterlockedCompareExchange((PLONG)(PointerPte), Exchange, Comperand)
189
190#define InterlockedExchangePte(PointerPte, Value) \
191 InterlockedExchange((PLONG)(PointerPte), Value)
192#endif
193
195{
198
199 FAST_MUTEX Lock; /* lock which protects the page directory */
200 LARGE_INTEGER RawLength; /* length of the segment which is part of the mapped file */
201 LARGE_INTEGER Length; /* absolute length of the segment */
208
209 struct
210 {
211 ULONGLONG FileOffset; /* start offset into the file for image sections */
212 ULONG_PTR VirtualAddress; /* start offset into the address range for image sections */
215
217
219
222
224{
230
236
237#define MM_PHYSICALMEMORY_SEGMENT (0x1)
238#define MM_DATAFILE_SEGMENT (0x2)
239#define MM_SEGMENT_INDELETE (0x4)
240#define MM_SEGMENT_INCREATE (0x8)
241#define MM_IMAGE_SECTION_FLUSH_DELETE (0x10)
242
243
244#define MA_GetStartingAddress(_MemoryArea) ((_MemoryArea)->VadNode.StartingVpn << PAGE_SHIFT)
245#define MA_GetEndingAddress(_MemoryArea) (((_MemoryArea)->VadNode.EndingVpn + 1) << PAGE_SHIFT)
246
247typedef struct _MEMORY_AREA
248{
250
256
257 struct
258 {
264
265typedef struct _MM_RMAP_ENTRY
266{
270#if DBG
271 PVOID Caller;
272#endif
273}
275
276#if MI_TRACE_PFNS
279#define MI_SET_USAGE(x) MI_PFN_CURRENT_USAGE = x
280#define MI_SET_PROCESS2(x) memcpy(MI_PFN_CURRENT_PROCESS_NAME, x, min(sizeof(x), sizeof(MI_PFN_CURRENT_PROCESS_NAME)))
282void
284{
285 if (!Process)
286 MI_SET_PROCESS2("Kernel");
287 else if (Process == (PEPROCESS)1)
288 MI_SET_PROCESS2("Hydra");
289 else
290 MI_SET_PROCESS2(Process->ImageFileName);
291}
292
294void
295MI_SET_PROCESS_USTR(PUNICODE_STRING ustr)
296{
297 PWSTR pos, strEnd;
298 ULONG i;
299
300 if (!ustr->Buffer || ustr->Length == 0)
301 {
303 return;
304 }
305
306 pos = strEnd = &ustr->Buffer[ustr->Length / sizeof(WCHAR)];
307 while ((*pos != L'\\') && (pos > ustr->Buffer))
308 pos--;
309
310 if (*pos == L'\\')
311 pos++;
312
313 for (i = 0; i < sizeof(MI_PFN_CURRENT_PROCESS_NAME) && pos <= strEnd; i++, pos++)
315}
316#else
317#define MI_SET_USAGE(x)
318#define MI_SET_PROCESS(x)
319#define MI_SET_PROCESS2(x)
320#endif
321
322typedef enum _MI_PFN_USAGES
323{
351
352//
353// These two mappings are actually used by Windows itself, based on the ASSERTS
354//
355#define StartOfAllocation ReadInProgress
356#define EndOfAllocation WriteInProgress
357
358typedef struct _MMPFNENTRY
359{
361 USHORT ReadInProgress:1; // StartOfAllocation
362 USHORT WriteInProgress:1; // EndOfAllocation
371
372// Mm internal
373typedef struct _MMPFN
374{
375 union
376 {
382
383 // HACK for ROSPFN
385 } u1;
387 union
388 {
391 } u2;
392 union
393 {
394 struct
395 {
398 };
399 struct
400 {
403 } e2;
404 } u3;
405 union
406 {
409
410 // HACK for ROSPFN
412 };
413 union
414 {
416 struct
417 {
424 };
425 } u4;
426#if MI_TRACE_PFNS
427 MI_PFN_USAGES PfnUsage;
428 CHAR ProcessName[16];
429#define MI_SET_PFN_PROCESS_NAME(pfn, x) memcpy(pfn->ProcessName, x, min(sizeof(x), sizeof(pfn->ProcessName)))
430 PVOID CallSite;
431#endif
432
433 // HACK until WS lists are supported
438
439extern PMMPFN MmPfnDatabase;
440
441typedef struct _MMPFNLIST
442{
448
454
456{
461
462typedef struct _MM_REGION
463{
469
470// Mm internal
471/* Entry describing free pool memory */
472typedef struct _MMFREE_POOL_ENTRY
473{
479
480/* Signature of a freed block */
481#define MM_FREE_POOL_SIGNATURE 'ARM3'
482
483/* Paged pool information */
485{
495
497
498/* Page file information */
499typedef struct _MMPAGING_FILE
500{
510}
512
514
515typedef VOID
520 ULONG OldType,
521 ULONG OldProtect,
522 ULONG NewType,
524);
525
526typedef VOID
532 SWAPENTRY SwapEntry,
533 BOOLEAN Dirty
534);
535
536//
537// Mm copy support for Kd
538//
540NTAPI
544 IN ULONG Size,
546);
547
548//
549// Determines if a given address is a session address
550//
552NTAPI
555);
556
557ULONG
558NTAPI
561);
562
563ULONG
564NTAPI
567);
568
569/* marea.c *******************************************************************/
570
572NTAPI
575 ULONG Type,
578 ULONG Protection,
580 ULONG AllocationFlags,
581 ULONG AllocationGranularity
582);
583
585NTAPI
589);
590
592NTAPI
597 PVOID FreePageContext
598);
599
600VOID
601NTAPI
604 PMMVAD Vad);
605
607NTAPI
612);
613
614PVOID
615NTAPI
619 ULONG_PTR Granularity,
620 BOOLEAN TopDown
621);
622
623VOID
624NTAPI
627
628VOID
629NTAPI
631
632/* npool.c *******************************************************************/
633
634CODE_SEG("INIT")
635VOID
636NTAPI
638
639PVOID
640NTAPI
643 IN SIZE_T SizeInBytes
644);
645
647NTAPI
650);
651
652ULONG
653NTAPI
655 IN PVOID StartingAddress
656);
657
658/* pool.c *******************************************************************/
659
662NTAPI
663MmRaisePoolQuota(
667);
668
670VOID
671NTAPI
672MmReturnPoolQuota(
675);
676
677/* mdl.c *********************************************************************/
678
679VOID
680NTAPI
682 PMDL Mdl,
683 PPFN_NUMBER Pages
684);
685
686/* mminit.c ******************************************************************/
687
688VOID
689NTAPI
691 VOID
692);
693
694CODE_SEG("INIT")
696NTAPI
697MmInitSystem(IN ULONG Phase,
698 IN PLOADER_PARAMETER_BLOCK LoaderBlock);
699
700
701/* pagefile.c ****************************************************************/
702
704NTAPI
706
707VOID
708NTAPI
710
711CODE_SEG("INIT")
712VOID
713NTAPI
715
717NTAPI
719
721NTAPI
723 SWAPENTRY SwapEntry,
725);
726
728NTAPI
730 SWAPENTRY SwapEntry,
732);
733
734VOID
735NTAPI
737
739NTAPI
742 _In_ ULONG PageFileIndex,
743 _In_ ULONG_PTR PageFileOffset);
744
745/* process.c ****************************************************************/
746
748NTAPI
751 IN PEPROCESS Clone OPTIONAL,
752 IN PVOID Section OPTIONAL,
755);
756
758NTAPI
761 IN PINITIAL_PEB InitialPeb,
762 OUT PPEB *BasePeb
763);
764
766NTAPI
770 IN PINITIAL_TEB InitialTeb,
771 OUT PTEB* BaseTeb
772);
773
774VOID
775NTAPI
778 PTEB Teb
779);
780
781VOID
782NTAPI
784
785VOID
786NTAPI
788
789ULONG
790NTAPI
792
794NTAPI
797 IN UCHAR MemoryPriority
798);
799
800/* i386/pfault.c *************************************************************/
801
803NTAPI
805 ULONG Cs,
806 PULONG Eip,
807 PULONG Eax,
808 ULONG Cr2,
810);
811
812/* special.c *****************************************************************/
813
814VOID
815NTAPI
817
819NTAPI
822 IN ULONG Tag);
823
825NTAPI
827 IN PVOID P);
828
830NTAPI
832 IN PVOID P);
833
834PVOID
835NTAPI
838 IN ULONG Tag,
840 IN ULONG SpecialType);
841
842VOID
843NTAPI
845 IN PVOID P);
846
847/* mm.c **********************************************************************/
848
850NTAPI
852 IN ULONG FaultCode,
855 IN PVOID TrapInformation
856);
857
858/* process.c *****************************************************************/
859
860PVOID
861NTAPI
863
864VOID
865NTAPI
867 BOOLEAN GuiStack);
868
869/* balance.c / pagefile.c******************************************************/
870
872{
873 /*
874 * Add up all the used "Committed" memory + pagefile.
875 * Not sure this is right. 8^\
876 * MmTotalCommittedPages should be adjusted consistently with
877 * other counters at different places.
878 *
879 MmTotalCommittedPages = MiMemoryConsumers[MC_SYSTEM].PagesUsed +
880 MiMemoryConsumers[MC_USER].PagesUsed +
881 MiUsedSwapPages;
882 */
883
884 /* Update Commitment */
886
887 /* Update Peak = max(Peak, Total) in a lockless way */
888 SIZE_T PeakCommitment = MmPeakCommitment;
889 while (TotalCommittedPages > PeakCommitment &&
890 InterlockedCompareExchangeSizeT(&MmPeakCommitment, TotalCommittedPages, PeakCommitment) != PeakCommitment)
891 {
892 PeakCommitment = MmPeakCommitment;
893 }
894}
895
896/* balance.c *****************************************************************/
897
898CODE_SEG("INIT")
899VOID
900NTAPI
902 ULONG Consumer,
903 NTSTATUS (*Trim)(ULONG Target, ULONG Priority, PULONG NrFreed)
904);
905
906CODE_SEG("INIT")
907VOID
908NTAPI
910 ULONG NrAvailablePages,
911 ULONG NrSystemPages
912);
913
915NTAPI
917 ULONG Consumer,
919);
920
922NTAPI
924 ULONG Consumer,
925 BOOLEAN MyWait,
926 PPFN_NUMBER AllocatedPage
927);
928
929CODE_SEG("INIT")
930VOID
931NTAPI
933
934VOID
935NTAPI
937
938/* rmap.c **************************************************************/
939#define RMAP_SEGMENT_MASK ~((ULONG_PTR)0xff)
940#define RMAP_IS_SEGMENT(x) (((ULONG_PTR)(x) & RMAP_SEGMENT_MASK) == RMAP_SEGMENT_MASK)
941
942VOID
943NTAPI
946 struct _MM_RMAP_ENTRY* ListHead
947);
948
949struct _MM_RMAP_ENTRY*
950NTAPI
952
953VOID
954NTAPI
957 struct _EPROCESS *Process,
959);
960
961VOID
962NTAPI
966 VOID (*DeleteMapping)(PVOID Context, struct _EPROCESS *Process, PVOID Address)
967);
968
969VOID
970NTAPI
973 struct _EPROCESS *Process,
975);
976
977CODE_SEG("INIT")
978VOID
979NTAPI
981
983NTAPI
985
987NTAPI
990
991/* freelist.c **********************************************************/
998KIRQL
999MiAcquirePfnLock(VOID)
1000{
1002}
1003
1008VOID
1009MiReleasePfnLock(
1011{
1013}
1014
1019VOID
1020MiAcquirePfnLockAtDpcLevel(VOID)
1021{
1022 PKSPIN_LOCK_QUEUE LockQueue;
1023
1025 LockQueue = &KeGetCurrentPrcb()->LockQueue[LockQueuePfnLock];
1026 KeAcquireQueuedSpinLockAtDpcLevel(LockQueue);
1027}
1028
1033VOID
1034MiReleasePfnLockFromDpcLevel(VOID)
1035{
1036 PKSPIN_LOCK_QUEUE LockQueue;
1037
1038 LockQueue = &KeGetCurrentPrcb()->LockQueue[LockQueuePfnLock];
1039 KeReleaseQueuedSpinLockFromDpcLevel(LockQueue);
1041}
1042
1043#define MI_ASSERT_PFN_LOCK_HELD() NT_ASSERT((KeGetCurrentIrql() >= DISPATCH_LEVEL) && (MmPfnLock != 0))
1044
1046PMMPFN
1048{
1049 PMMPFN Page;
1050 extern RTL_BITMAP MiPfnBitMap;
1051
1052 /* Make sure the PFN number is valid */
1053 if (Pfn > MmHighestPhysicalPage) return NULL;
1054
1055 /* Make sure this page actually has a PFN entry */
1056 if ((MiPfnBitMap.Buffer) && !(RtlTestBit(&MiPfnBitMap, (ULONG)Pfn))) return NULL;
1057
1058 /* Get the entry */
1059 Page = &MmPfnDatabase[Pfn];
1060
1061 /* Return it */
1062 return Page;
1063};
1064
1068{
1069 //
1070 // This will return the Page Frame Number (PFN) from the MMPFN
1071 //
1072 return Pfn1 - MmPfnDatabase;
1073}
1074
1076NTAPI
1077MmGetLRUNextUserPage(PFN_NUMBER PreviousPage, BOOLEAN MoveToLast);
1078
1080NTAPI
1082
1083VOID
1084NTAPI
1086 IN BOOLEAN StatusOnly
1087);
1088
1089VOID
1090NTAPI
1092 VOID
1093);
1094
1095/* hypermap.c *****************************************************************/
1096PVOID
1097NTAPI
1100 IN PKIRQL OldIrql);
1101
1102VOID
1103NTAPI
1106 IN KIRQL OldIrql);
1107
1108PVOID
1109NTAPI
1111 IN PFN_NUMBER NumberOfPages);
1112
1113VOID
1114NTAPI
1116 IN PFN_NUMBER NumberOfPages);
1117
1118/* i386/page.c *********************************************************/
1119
1121NTAPI
1123 struct _EPROCESS* Process,
1124 PVOID Address,
1125 ULONG flProtect,
1127);
1128
1130NTAPI
1132 struct _EPROCESS* Process,
1133 PVOID Address,
1134 ULONG flProtect,
1136);
1137
1139NTAPI
1143 _In_ ULONG flProtect,
1145
1146ULONG
1147NTAPI
1149 struct _EPROCESS* Process,
1150 PVOID Address);
1151
1152VOID
1153NTAPI
1155 struct _EPROCESS* Process,
1156 PVOID Address,
1157 ULONG flProtect
1158);
1159
1160BOOLEAN
1161NTAPI
1163 struct _EPROCESS* Process,
1165);
1166
1167BOOLEAN
1168NTAPI
1170 struct _EPROCESS* Process,
1172);
1173
1174CODE_SEG("INIT")
1175VOID
1176NTAPI
1178
1179VOID
1180NTAPI
1183 PVOID Address,
1184 SWAPENTRY* SwapEntry
1185);
1186
1188NTAPI
1191 PVOID Address,
1192 SWAPENTRY SwapEntry
1193);
1194
1195VOID
1196NTAPI
1199 PVOID Address,
1200 SWAPENTRY *SwapEntry);
1201
1202BOOLEAN
1203NTAPI
1207);
1208
1210NTAPI
1212 ULONG Consumer
1213);
1214
1215VOID
1216NTAPI
1218
1219VOID
1220NTAPI
1222
1223ULONG
1224NTAPI
1226
1227BOOLEAN
1228NTAPI
1230
1231VOID
1232NTAPI
1235 SWAPENTRY SavedSwapEntry);
1236
1238NTAPI
1240
1241VOID
1242NTAPI
1246);
1247
1248VOID
1249NTAPI
1251#define MmSetCleanPage(__P, __A) MmSetDirtyBit(__P, __A, FALSE)
1252#define MmSetDirtyPage(__P, __A) MmSetDirtyBit(__P, __A, TRUE)
1253
1254VOID
1255NTAPI
1257 struct _EPROCESS *Process,
1259);
1260
1262NTAPI
1264 struct _EPROCESS *Process,
1266);
1267
1268BOOLEAN
1269NTAPI
1271 IN ULONG MinWs,
1272 IN PEPROCESS Dest,
1273 IN PULONG_PTR DirectoryTableBase
1274);
1275
1276CODE_SEG("INIT")
1278NTAPI
1281 IN PULONG_PTR DirectoryTableBase
1282);
1283
1284CODE_SEG("INIT")
1286NTAPI
1289);
1290
1292NTAPI
1293MmSetExecuteOptions(IN ULONG ExecuteOptions);
1294
1296NTAPI
1297MmGetExecuteOptions(IN PULONG ExecuteOptions);
1298
1300BOOLEAN
1306);
1307
1309BOOLEAN
1310MmDeletePhysicalMapping(
1315);
1316
1317/* arch/procsup.c ************************************************************/
1318
1319BOOLEAN
1322 _In_ PULONG_PTR DirectoryTableBase);
1323
1324/* wset.c ********************************************************************/
1325
1328 ULONG Target,
1330 PULONG NrFreedPages
1331);
1332
1333/* region.c ************************************************************/
1334
1336NTAPI
1340 PLIST_ENTRY RegionListHead,
1341 PVOID StartAddress,
1342 SIZE_T Length,
1343 ULONG NewType,
1345 PMM_ALTER_REGION_FUNC AlterFunc
1346);
1347
1348VOID
1349NTAPI
1351 PLIST_ENTRY RegionListHead,
1352 SIZE_T Length,
1353 ULONG Type,
1355);
1356
1358NTAPI
1361 PLIST_ENTRY RegionListHead,
1362 PVOID Address,
1363 PVOID* RegionBaseAddress
1364);
1365
1366/* section.c *****************************************************************/
1367
1368#define PFN_FROM_SSE(E) ((PFN_NUMBER)((E) >> PAGE_SHIFT))
1369#define IS_SWAP_FROM_SSE(E) ((E) & 0x00000001)
1370#define MM_IS_WAIT_PTE(E) \
1371 (IS_SWAP_FROM_SSE(E) && SWAPENTRY_FROM_SSE(E) == MM_WAIT_ENTRY)
1372#define MAKE_PFN_SSE(P) ((ULONG_PTR)((P) << PAGE_SHIFT))
1373#define SWAPENTRY_FROM_SSE(E) ((E) >> 1)
1374#define MAKE_SWAP_SSE(S) (((ULONG_PTR)(S) << 1) | 0x1)
1375#define DIRTY_SSE(E) ((E) | 2)
1376#define CLEAN_SSE(E) ((E) & ~2)
1377#define IS_DIRTY_SSE(E) ((E) & 2)
1378#define WRITE_SSE(E) ((E) | 4)
1379#define IS_WRITE_SSE(E) ((E) & 4)
1380#ifdef _WIN64
1381#define PAGE_FROM_SSE(E) ((E) & 0xFFFFFFF000ULL)
1382#else
1383#define PAGE_FROM_SSE(E) ((E) & 0xFFFFF000)
1384#endif
1385#define SHARE_COUNT_FROM_SSE(E) (((E) & 0x00000FFC) >> 3)
1386#define MAX_SHARE_COUNT 0x1FF
1387#define MAKE_SSE(P, C) ((ULONG_PTR)((P) | ((C) << 3)))
1388#define BUMPREF_SSE(E) (PAGE_FROM_SSE(E) | ((SHARE_COUNT_FROM_SSE(E) + 1) << 3) | ((E) & 0x7))
1389#define DECREF_SSE(E) (PAGE_FROM_SSE(E) | ((SHARE_COUNT_FROM_SSE(E) - 1) << 3) | ((E) & 0x7))
1390
1391VOID
1392NTAPI
1394 const char *file,
1395 int line);
1396
1397#define MmLockSectionSegment(x) _MmLockSectionSegment(x,__FILE__,__LINE__)
1398
1399VOID
1400NTAPI
1402 const char *file,
1403 int line);
1404
1405#define MmUnlockSectionSegment(x) _MmUnlockSectionSegment(x,__FILE__,__LINE__)
1406
1407VOID
1408NTAPI
1410 OUT PSECTION_IMAGE_INFORMATION ImageInformation
1411);
1412
1414NTAPI
1416 IN PVOID Section
1417);
1419NTAPI
1423);
1424
1426NTAPI
1428 IN PVOID Section,
1430);
1431
1433NTAPI
1436 PVOID Address,
1439);
1440
1442NTAPI
1447 SIZE_T Length,
1448 ULONG Protect,
1449 PULONG OldProtect
1450);
1451
1452CODE_SEG("INIT")
1454NTAPI
1456
1458NTAPI
1462 PVOID Address,
1464);
1465
1467NTAPI
1471 PVOID Address,
1473);
1474
1475CODE_SEG("INIT")
1477NTAPI
1479
1481NTAPI
1485 PVOID Address,
1487);
1488
1489VOID
1490NTAPI
1492
1493/* Exported from NT 6.2 onward. We keep it internal. */
1495NTAPI
1497 _In_ PVOID Section,
1502
1503BOOLEAN
1504NTAPI
1508 _In_ ULONG Length);
1509
1511NTAPI
1515 _In_ ULONG Length);
1516
1518NTAPI
1524
1526NTAPI
1531 _In_ PLARGE_INTEGER ValidDataLength);
1532
1533BOOLEAN
1534NTAPI
1538 _In_ ULONG Length);
1539
1540BOOLEAN
1541NTAPI
1547
1548BOOLEAN
1549NTAPI
1553 BOOLEAN Dirty,
1555 ULONG_PTR *InEntry);
1556
1562VOID
1563NTAPI
1564MmDereferenceSegmentWithLock(
1567
1571VOID
1572MmDereferenceSegment(PMM_SECTION_SEGMENT Segment)
1573{
1574 MmDereferenceSegmentWithLock(Segment, MM_NOIRQL);
1575}
1576
1578NTAPI
1580 _In_ PVOID Section,
1582
1583/* sptab.c *******************************************************************/
1584
1586NTAPI
1590 const char *file,
1591 int line);
1592
1594NTAPI
1597 const char *file,
1598 int line);
1599
1600#define MmSetPageEntrySectionSegment(S,O,E) _MmSetPageEntrySectionSegment(S,O,E,__FILE__,__LINE__)
1601
1602#define MmGetPageEntrySectionSegment(S,O) _MmGetPageEntrySectionSegment(S,O,__FILE__,__LINE__)
1603
1604/* sysldr.c ******************************************************************/
1605
1606CODE_SEG("INIT")
1607VOID
1608NTAPI
1610 IN PLOADER_PARAMETER_BLOCK LoaderBlock
1611);
1612
1613CODE_SEG("INIT")
1614BOOLEAN
1615NTAPI
1617 IN PLOADER_PARAMETER_BLOCK LoaderBlock
1618);
1619
1620BOOLEAN
1621NTAPI
1623
1624VOID
1625NTAPI
1627
1629NTAPI
1632 IN PUNICODE_STRING NamePrefix OPTIONAL,
1633 IN PUNICODE_STRING LoadedName OPTIONAL,
1634 IN ULONG Flags,
1635 OUT PVOID *ModuleObject,
1636 OUT PVOID *ImageBaseAddress
1637);
1638
1640NTAPI
1642 IN PVOID ImageHandle
1643);
1644
1646NTAPI
1648 IN HANDLE ImageHandle,
1649 IN BOOLEAN PurgeSection
1650);
1651
1653NTAPI
1655 _In_ PLDR_DATA_TABLE_ENTRY LdrEntry,
1657
1658VOID
1659NTAPI
1661 IN PLDR_DATA_TABLE_ENTRY LdrEntry);
1662
1663/* ReactOS-only, used by psmgr.c PspLookupSystemDllEntryPoint() as well */
1665NTAPI
1667 _In_ PVOID ImageBase,
1668 _In_ PCSTR ExportName,
1670 _Out_opt_ PBOOLEAN IsForwarder,
1671 _In_ NTSTATUS NotFoundStatus);
1672
1673/* Exported from NT 10.0 onward. We keep it internal. */
1674PVOID
1675NTAPI
1677 _In_ PVOID ImageBase,
1678 _In_ PCSTR ExportName);
1679
1680/* procsup.c *****************************************************************/
1681
1683NTAPI
1685 IN PVOID StackPointer
1686);
1687
1688
1690VOID
1692{
1693 ASSERT(!PsGetCurrentThread()->OwnsProcessWorkingSetExclusive);
1694 ASSERT(!PsGetCurrentThread()->OwnsProcessWorkingSetShared);
1695 ASSERT(!PsGetCurrentThread()->OwnsSystemWorkingSetExclusive);
1696 ASSERT(!PsGetCurrentThread()->OwnsSystemWorkingSetShared);
1697 ASSERT(!PsGetCurrentThread()->OwnsSessionWorkingSetExclusive);
1698 ASSERT(!PsGetCurrentThread()->OwnsSessionWorkingSetShared);
1699 KeAcquireGuardedMutex(&CONTAINING_RECORD(AddressSpace, EPROCESS, Vm)->AddressCreationLock);
1700}
1701
1703VOID
1705{
1706 KeReleaseGuardedMutex(&CONTAINING_RECORD(AddressSpace, EPROCESS, Vm)->AddressCreationLock);
1707}
1708
1712{
1713 if (AddressSpace == MmKernelAddressSpace) return NULL;
1715}
1716
1720{
1721 return &((PEPROCESS)KeGetCurrentThread()->ApcState.Process)->Vm;
1722}
1723
1727{
1728 return MmKernelAddressSpace;
1729}
1730
1731
1732/* expool.c ******************************************************************/
1733
1734VOID
1735NTAPI
1737 PVOID P,
1739 ULONG Tag);
1740
1741VOID
1742NTAPI
1744 IN PVOID P);
1745
1746
1747/* mmsup.c *****************************************************************/
1748
1750NTAPI
1752 IN SIZE_T WorkingSetMinimumInBytes,
1753 IN SIZE_T WorkingSetMaximumInBytes,
1754 IN ULONG SystemCache,
1755 IN BOOLEAN IncreaseOkay);
1756
1757
1758/* session.c *****************************************************************/
1759
1762NTAPI
1763MmAttachSession(
1764 _Inout_ PVOID SessionEntry,
1766
1768VOID
1769NTAPI
1770MmDetachSession(
1771 _Inout_ PVOID SessionEntry,
1773
1774VOID
1775NTAPI
1777 _Inout_ PVOID SessionEntry);
1778
1779PVOID
1780NTAPI
1783
1785VOID
1786NTAPI
1787MmSetSessionLocaleId(
1789
1790/* shutdown.c *****************************************************************/
1791
1792VOID
1794
1795/* virtual.c *****************************************************************/
1796
1798NTAPI
1799MmCopyVirtualMemory(IN PEPROCESS SourceProcess,
1801 IN PEPROCESS TargetProcess,
1805 OUT PSIZE_T ReturnSize);
1806
1807/* wslist.cpp ****************************************************************/
1808_Requires_exclusive_lock_held_(WorkingSet->WorkingSetMutex)
1809VOID
1810NTAPI
1812
1813#ifdef __cplusplus
1814} // extern "C"
1815
1816namespace ntoskrnl
1817{
1818using MiPfnLockGuard = const KiQueuedSpinLockGuard<LockQueuePfnLock>;
1819} // namespace ntoskrnl
1820
1821#endif
#define CODE_SEG(...)
unsigned char BOOLEAN
Type
Definition: Type.h:7
#define VOID
Definition: acefi.h:82
ACPI_BUFFER *RetBuffer ACPI_BUFFER *RetBuffer char ACPI_WALK_RESOURCE_CALLBACK void *Context ACPI_BUFFER *RetBuffer UINT16 ACPI_RESOURCE **ResourcePtr ACPI_GENERIC_ADDRESS *Reg UINT32 *ReturnValue UINT8 UINT8 *Slp_TypB ACPI_PHYSICAL_ADDRESS PhysicalAddress64 UINT32 UINT32 *TimeElapsed UINT32 ACPI_STATUS const char UINT32 ACPI_STATUS const char UINT32 const char const char * ModuleName
Definition: acpixf.h:1280
LONG NTSTATUS
Definition: precomp.h:26
__int64 * PLONG64
Definition: basetsd.h:183
return
Definition: dirsup.c:529
_In_ CDROM_SCAN_FOR_SPECIAL_INFO _In_ PCDROM_SCAN_FOR_SPECIAL_HANDLER Function
Definition: cdrom.h:1156
Definition: bufpool.h:45
#define _Acquires_lock_(lock)
#define _Requires_lock_held_(lock)
#define _Requires_lock_not_held_(lock)
#define _Releases_lock_(lock)
#define _Requires_exclusive_lock_held_(lock)
#define RtlTestBit
Definition: dbgbitmap.h:347
#define NULL
Definition: types.h:112
#define P(row, col)
#define NTSTATUS
Definition: precomp.h:21
ULONG SessionId
Definition: dllmain.c:28
return Iosb
Definition: create.c:4402
#define _IRQL_requires_min_(irql)
Definition: driverspecs.h:231
#define _IRQL_requires_max_(irql)
Definition: driverspecs.h:230
#define _IRQL_restores_
Definition: driverspecs.h:233
#define _IRQL_requires_(irql)
Definition: driverspecs.h:229
#define _IRQL_saves_
Definition: driverspecs.h:235
#define _IRQL_raises_(irql)
Definition: driverspecs.h:228
UCHAR KIRQL
Definition: env_spec_w32.h:591
ULONG KSPIN_LOCK
Definition: env_spec_w32.h:72
#define PsGetCurrentThread()
Definition: env_spec_w32.h:81
#define APC_LEVEL
Definition: env_spec_w32.h:695
#define KeGetCurrentIrql()
Definition: env_spec_w32.h:706
KIRQL * PKIRQL
Definition: env_spec_w32.h:592
#define DISPATCH_LEVEL
Definition: env_spec_w32.h:696
#define InterlockedCompareExchangeSizeT(Destination, Exchange, Comperand)
Definition: ex.h:1539
_Must_inspect_result_ _In_ USHORT NewSize
Definition: fltkernel.h:975
_Must_inspect_result_ _In_ PDEVICE_OBJECT _In_ PSECTION_OBJECT_POINTERS SectionObjectPointer
Definition: fsrtlfuncs.h:1369
_Must_inspect_result_ _In_ PLARGE_INTEGER _In_ PLARGE_INTEGER _In_ ULONG _In_ PFILE_OBJECT _In_ PVOID Process
Definition: fsrtlfuncs.h:223
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 FASTCALL KeReleaseGuardedMutex(IN OUT PKGUARDED_MUTEX GuardedMutex)
Definition: gmutex.c:53
VOID FASTCALL KeAcquireGuardedMutex(IN PKGUARDED_MUTEX GuardedMutex)
Definition: gmutex.c:42
VOID FASTCALL KeReleaseQueuedSpinLock(IN KSPIN_LOCK_QUEUE_NUMBER LockNumber, IN KIRQL OldIrql)
Definition: spinlock.c:154
KIRQL FASTCALL KeAcquireQueuedSpinLock(IN KSPIN_LOCK_QUEUE_NUMBER LockNumber)
Definition: spinlock.c:108
#define KeGetCurrentThread
Definition: hal.h:55
_In_ ULONG Mode
Definition: hubbusif.h:303
#define InterlockedExchangeAddSizeT(a, b)
Definition: interlocked.h:196
LIST_ENTRY * ModuleListHead
Definition: kdpacket.c:23
#define ASSERT(a)
Definition: mode.c:44
unsigned __int64 ULONG64
Definition: imports.h:198
_In_ NDIS_ERROR_CODE ErrorCode
Definition: ndis.h:4436
FORCEINLINE struct _KPRCB * KeGetCurrentPrcb(VOID)
Definition: ketypes.h:1150
_In_ HANDLE _Outptr_result_bytebuffer_ ViewSize PVOID * BaseAddress
Definition: mmfuncs.h:404
_In_ HANDLE _Outptr_result_bytebuffer_ ViewSize PVOID _In_ ULONG_PTR _In_ SIZE_T _Inout_opt_ PLARGE_INTEGER SectionOffset
Definition: mmfuncs.h:407
_In_ HANDLE _Outptr_result_bytebuffer_ ViewSize PVOID _In_ ULONG_PTR _In_ SIZE_T _Inout_opt_ PLARGE_INTEGER _Inout_ PSIZE_T ViewSize
Definition: mmfuncs.h:408
enum _MMLISTS MMLISTS
_In_ PMEMORY_AREA MemoryArea
Definition: newmm.h:207
_In_ PMEMORY_AREA _In_ PVOID _In_ BOOLEAN Locked
Definition: newmm.h:209
#define _Outptr_result_bytebuffer_(s)
Definition: no_sal2.h:288
#define _Out_opt_
Definition: no_sal2.h:214
#define _Inout_
Definition: no_sal2.h:162
#define _Success_(c)
Definition: no_sal2.h:84
#define _Inout_opt_
Definition: no_sal2.h:216
#define _Out_
Definition: no_sal2.h:160
#define _In_
Definition: no_sal2.h:158
#define _In_opt_
Definition: no_sal2.h:212
#define _When_(c, a)
Definition: no_sal2.h:38
struct _EPROCESS * PEPROCESS
Definition: nt_native.h:30
_In_ ULONG _In_ ULONG Offset
Definition: ntddpcm.h:101
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:102
struct _MMFREE_POOL_ENTRY * PMMFREE_POOL_ENTRY
PMMSUPPORT MmKernelAddressSpace
Definition: mminit.c:27
PVOID MmUnloadedDrivers
Definition: sysldr.c:30
PMM_SECTION_SEGMENT NTAPI MmGetSectionAssociation(PFN_NUMBER Page, PLARGE_INTEGER Offset)
Definition: sptab.c:374
VOID MmShutdownSystem(IN ULONG Phase)
Definition: shutdown.c:77
PFN_NUMBER MmResidentAvailablePages
Definition: freelist.c:27
NTSTATUS NTAPI MmInitializeHandBuiltProcess2(IN PEPROCESS Process)
Definition: procsup.c:1157
struct _MM_MEMORY_CONSUMER MM_MEMORY_CONSUMER
PMMPAGING_FILE MmPagingFile[MAX_PAGING_FILES]
Definition: pagefile.c:57
PFN_NUMBER NTAPI MmAllocPage(ULONG Consumer)
Definition: freelist.c:601
SIZE_T MmTotalPagedPoolQuota
Definition: pool.c:28
PVOID MmTriageActionTaken
Definition: drvmgmt.c:27
_In_ SIZE_T _Out_ PSIZE_T NewMaxQuota
Definition: mm.h:667
VOID NTAPI ExpCheckPoolAllocation(PVOID P, POOL_TYPE PoolType, ULONG Tag)
Definition: expool.c:296
BOOLEAN NTAPI MiInitializeLoadedModuleList(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
Definition: sysldr.c:2242
FORCEINLINE PMMSUPPORT MmGetCurrentAddressSpace(VOID)
Definition: mm.h:1719
FORCEINLINE PMMPFN MiGetPfnEntry(IN PFN_NUMBER Pfn)
Definition: mm.h:1047
struct _MMPFNLIST MMPFNLIST
VOID NTAPI MmDeleteKernelStack(PVOID Stack, BOOLEAN GuiStack)
VOID NTAPI MmMakeKernelResourceSectionWritable(VOID)
Definition: sysldr.c:2362
enum _MI_PFN_USAGES MI_PFN_USAGES
#define MI_SET_PROCESS2(x)
Definition: mm.h:319
#define MM_NOIRQL
Definition: mm.h:70
_MI_PFN_USAGES
Definition: mm.h:323
@ MI_USAGE_NONPAGED_POOL_EXPANSION
Definition: mm.h:327
@ MI_USAGE_LEGACY_PAGE_DIRECTORY
Definition: mm.h:336
@ MI_USAGE_PAGE_FILE
Definition: mm.h:346
@ MI_USAGE_NOT_SET
Definition: mm.h:324
@ MI_USAGE_COW
Definition: mm.h:347
@ MI_USAGE_PEB_TEB
Definition: mm.h:332
@ MI_USAGE_PAGE_TABLE
Definition: mm.h:334
@ MI_USAGE_INIT_MEMORY
Definition: mm.h:345
@ MI_USAGE_VAD
Definition: mm.h:331
@ MI_USAGE_SYSTEM_PTE
Definition: mm.h:330
@ MI_USAGE_CONTINOUS_ALLOCATION
Definition: mm.h:338
@ MI_USAGE_PAGED_POOL
Definition: mm.h:325
@ MI_USAGE_MDL
Definition: mm.h:339
@ MI_USAGE_PFN_DATABASE
Definition: mm.h:343
@ MI_USAGE_ZERO_LOOP
Definition: mm.h:341
@ MI_USAGE_DRIVER_PAGE
Definition: mm.h:337
@ MI_USAGE_DEMAND_ZERO
Definition: mm.h:340
@ MI_USAGE_SECTION
Definition: mm.h:333
@ MI_USAGE_WSLE
Definition: mm.h:348
@ MI_USAGE_FREE_PAGE
Definition: mm.h:349
@ MI_USAGE_PAGE_DIRECTORY
Definition: mm.h:335
@ MI_USAGE_CACHE
Definition: mm.h:342
@ MI_USAGE_KERNEL_STACK_EXPANSION
Definition: mm.h:329
@ MI_USAGE_KERNEL_STACK
Definition: mm.h:328
@ MI_USAGE_NONPAGED_POOL
Definition: mm.h:326
@ MI_USAGE_BOOT_DRIVER
Definition: mm.h:344
FORCEINLINE VOID MmLockAddressSpace(PMMSUPPORT AddressSpace)
Definition: mm.h:1691
VOID NTAPI MmSetPageProtect(struct _EPROCESS *Process, PVOID Address, ULONG flProtect)
BOOLEAN NTAPI MmIsSessionAddress(IN PVOID Address)
Definition: session.c:48
KSPIN_LOCK MmPfnLock
Definition: krnlinit.c:49
NTSTATUS NTAPI MmLoadSystemImage(IN PUNICODE_STRING FileName, IN PUNICODE_STRING NamePrefix OPTIONAL, IN PUNICODE_STRING LoadedName OPTIONAL, IN ULONG Flags, OUT PVOID *ModuleObject, OUT PVOID *ImageBaseAddress)
Definition: sysldr.c:2938
VOID NTAPI MiUnmapPageInHyperSpace(IN PEPROCESS Process, IN PVOID Address, IN KIRQL OldIrql)
Definition: hypermap.c:91
struct _MM_PAGED_POOL_INFO * PMM_PAGED_POOL_INFO
PFILE_OBJECT NTAPI MmGetFileObjectForSection(IN PVOID Section)
Definition: section.c:1541
struct _MM_RMAP_ENTRY *NTAPI MmGetRmapListHeadPage(PFN_NUMBER Page)
Definition: freelist.c:458
VOID NTAPI MmFreeSectionSegments(PFILE_OBJECT FileObject)
NTSTATUS NTAPI MmCopyVirtualMemory(IN PEPROCESS SourceProcess, IN PVOID SourceAddress, IN PEPROCESS TargetProcess, OUT PVOID TargetAddress, IN SIZE_T BufferSize, IN KPROCESSOR_MODE PreviousMode, OUT PSIZE_T ReturnSize)
Definition: virtual.c:1270
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 ExReturnPoolQuota(IN PVOID P)
Definition: expool.c:1852
NTSTATUS NTAPI MiReadPageFile(_In_ PFN_NUMBER Page, _In_ ULONG PageFileIndex, _In_ ULONG_PTR PageFileOffset)
Definition: pagefile.c:211
VOID NTAPI MmDereferencePage(PFN_NUMBER Page)
Definition: freelist.c:565
VOID NTAPI MmGetPageFileMapping(PEPROCESS Process, PVOID Address, SWAPENTRY *SwapEntry)
Definition: page.c:299
ULONG NTAPI MmGetPageProtect(struct _EPROCESS *Process, PVOID Address)
SIZE_T MmTotalCommitLimit
Definition: mminit.c:359
struct _MMPFNLIST * PMMPFNLIST
ULONG NTAPI MmGetSessionId(IN PEPROCESS Process)
Definition: session.c:179
NTSTATUS NTAPI MmGetFileNameForSection(IN PVOID Section, OUT POBJECT_NAME_INFORMATION *ModuleName)
Definition: section.c:1668
NTSTATUS NTAPI MmCreateMemoryArea(PMMSUPPORT AddressSpace, ULONG Type, PVOID *BaseAddress, SIZE_T Length, ULONG Protection, PMEMORY_AREA *Result, ULONG AllocationFlags, ULONG AllocationGranularity)
Definition: marea.c:410
VOID NTAPI MmCleanProcessAddressSpace(IN PEPROCESS Process)
Definition: procsup.c:1267
POOL_TYPE NTAPI MmDeterminePoolType(IN PVOID VirtualAddress)
Definition: pool.c:408
MM_MEMORY_CONSUMER MiMemoryConsumers[MC_MAXIMUM]
Definition: balance.c:28
VOID NTAPI MmReferencePage(PFN_NUMBER Page)
Definition: freelist.c:518
PMMPTE MmDebugPte
Definition: mmdbg.c:31
_In_ SIZE_T CurrentMaxQuota
Definition: mm.h:665
SIZE_T MmTotalNonPagedPoolQuota
Definition: pool.c:27
NTSTATUS NTAPI MmNotPresentFaultSectionView(PMMSUPPORT AddressSpace, MEMORY_AREA *MemoryArea, PVOID Address, BOOLEAN Locked)
Definition: section.c:1537
NTSTATUS NTAPI MmPageFault(ULONG Cs, PULONG Eip, PULONG Eax, ULONG Cr2, ULONG ErrorCode)
ULONG NTAPI MmGetSessionLocaleId(VOID)
Definition: session.c:56
NTSTATUS NTAPI MmAdjustWorkingSetSize(IN SIZE_T WorkingSetMinimumInBytes, IN SIZE_T WorkingSetMaximumInBytes, IN ULONG SystemCache, IN BOOLEAN IncreaseOkay)
Definition: mmsup.c:44
LIST_ENTRY MmLoadedUserImageList
Definition: sysldr.c:22
PFN_COUNT MmNumberOfPhysicalPages
Definition: init.c:48
NTSTATUS NTAPI MmCreateVirtualMappingUnsafe(struct _EPROCESS *Process, PVOID Address, ULONG flProtect, PFN_NUMBER Page)
ULONG MmThrottleTop
Definition: mminit.c:396
NTSTATUS NTAPI MmCreateTeb(IN PEPROCESS Process, IN PCLIENT_ID ClientId, IN PINITIAL_TEB InitialTeb, OUT PTEB *BaseTeb)
Definition: procsup.c:757
struct _MM_RMAP_ENTRY * PMM_RMAP_ENTRY
VOID NTAPI MmRebalanceMemoryConsumers(VOID)
Definition: balance.c:290
PVOID NTAPI MiMapPageInHyperSpace(IN PEPROCESS Process, IN PFN_NUMBER Page, IN PKIRQL OldIrql)
Definition: hypermap.c:28
VOID NTAPI MmBuildMdlFromPages(PMDL Mdl, PPFN_NUMBER Pages)
Definition: pagefile.c:111
_In_ PVOID _Out_opt_ BOOLEAN * WasDirty
Definition: mm.h:1304
NTSTATUS NTAPI MmFreeMemoryArea(PMMSUPPORT AddressSpace, PMEMORY_AREA MemoryArea, PMM_FREE_PAGE_FUNC FreePage, PVOID FreePageContext)
Definition: marea.c:283
VOID NTAPI MiInitializeNonPagedPool(VOID)
Definition: pool.c:278
FORCEINLINE PFN_NUMBER MiGetPfnEntryIndex(IN PMMPFN Pfn1)
Definition: mm.h:1067
MMPFNLIST MmStandbyPageListHead
Definition: pfnlist.c:43
#define MmSetCleanPage(__P, __A)
Definition: mm.h:1251
ULONG NTAPI MmGetSessionIdEx(IN PEPROCESS Process)
Definition: session.c:194
struct _MEMORY_AREA MEMORY_AREA
PMMPFN MmPfnDatabase
Definition: freelist.c:24
VOID NTAPI MmInitializeBalancer(ULONG NrAvailablePages, ULONG NrSystemPages)
Definition: balance.c:44
PFN_COUNT MiFreeSwapPages
Definition: pagefile.c:66
BOOLEAN NTAPI MmIsPageSwapEntry(struct _EPROCESS *Process, PVOID Address)
struct _MMPFN MMPFN
VOID NTAPI _MmUnlockSectionSegment(PMM_SECTION_SEGMENT Segment, const char *file, int line)
Definition: data.c:107
struct _MM_IMAGE_SECTION_OBJECT MM_IMAGE_SECTION_OBJECT
VOID NTAPI MiRosCheckMemoryAreas(PMMSUPPORT AddressSpace)
VOID NTAPI MmDumpArmPfnDatabase(IN BOOLEAN StatusOnly)
Definition: mminit.c:1474
BOOLEAN NTAPI MmIsFileObjectAPagingFile(PFILE_OBJECT FileObject)
Definition: pagefile.c:119
VOID NTAPI MmFreeDriverInitialization(IN PLDR_DATA_TABLE_ENTRY LdrEntry)
Definition: sysldr.c:1673
struct _MMPFN * PMMPFN
BOOLEAN NTAPI MmIsDisabledPage(struct _EPROCESS *Process, PVOID Address)
PVOID NTAPI MiAllocatePoolPages(IN POOL_TYPE PoolType, IN SIZE_T SizeInBytes)
Definition: pool.c:422
BOOLEAN NTAPI MmPurgeSegment(_In_ PSECTION_OBJECT_POINTERS SectionObjectPointer, _In_opt_ PLARGE_INTEGER Offset, _In_ ULONG Length)
Definition: section.c:4833
BOOLEAN NTAPI MmUnsharePageEntrySectionSegment(PMEMORY_AREA MemoryArea, PMM_SECTION_SEGMENT Segment, PLARGE_INTEGER Offset, BOOLEAN Dirty, BOOLEAN PageOut, ULONG_PTR *InEntry)
Definition: section.c:1089
NTSTATUS NTAPI MmQuerySectionView(PMEMORY_AREA MemoryArea, PVOID Address, PMEMORY_BASIC_INFORMATION Info, PSIZE_T ResultLength)
Definition: section.c:2104
NTSTATUS NTAPI MmProtectSectionView(PMMSUPPORT AddressSpace, PMEMORY_AREA MemoryArea, PVOID BaseAddress, SIZE_T Length, ULONG Protect, PULONG OldProtect)
Definition: section.c:2068
MMPFNLIST MmModifiedPageListHead
Definition: pfnlist.c:45
struct _MMPAGING_FILE * PMMPAGING_FILE
_In_ PVOID _Out_opt_ BOOLEAN _Out_opt_ PPFN_NUMBER Page
Definition: mm.h:1306
NTSTATUS NTAPI _MmSetPageEntrySectionSegment(PMM_SECTION_SEGMENT Segment, PLARGE_INTEGER Offset, ULONG_PTR Entry, const char *file, int line)
Definition: sptab.c:178
SWAPENTRY NTAPI MmAllocSwapPage(VOID)
Definition: pagefile.c:322
struct _MM_PAGED_POOL_INFO MM_PAGED_POOL_INFO
PMEMORY_AREA NTAPI MmLocateMemoryAreaByAddress(PMMSUPPORT AddressSpace, PVOID Address)
Definition: marea.c:60
VOID NTAPI MiReloadBootLoadedDrivers(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
Definition: sysldr.c:1731
struct _MM_IMAGE_SECTION_OBJECT * PMM_IMAGE_SECTION_OBJECT
VOID NTAPI MiRosCleanupMemoryArea(PEPROCESS Process, PMMVAD Vad)
Definition: marea.c:521
PFN_NUMBER NTAPI MmGetLRUFirstUserPage(VOID)
Definition: freelist.c:45
MMPFNLIST MmZeroedPageListHead
Definition: pfnlist.c:41
VOID NTAPI MmDeleteProcessAddressSpace(IN PEPROCESS Process)
Definition: procsup.c:1366
NTSTATUS MmTrimUserMemory(ULONG Target, ULONG Priority, PULONG NrFreedPages)
Definition: balance.c:138
NTSTATUS NTAPI MmDbgCopyMemory(IN ULONG64 Address, IN PVOID Buffer, IN ULONG Size, IN ULONG Flags)
Definition: mmdbg.c:124
VOID NTAPI MmGetImageInformation(OUT PSECTION_IMAGE_INFORMATION ImageInformation)
Definition: section.c:1615
VOID NTAPI MiUnmapPagesInZeroSpace(IN PVOID VirtualAddress, IN PFN_NUMBER NumberOfPages)
Definition: hypermap.c:187
VOID NTAPI MmSetDirtyBit(PEPROCESS Process, PVOID Address, BOOLEAN Bit)
Definition: page.c:890
BOOLEAN NTAPI MmCheckDirtySegment(PMM_SECTION_SEGMENT Segment, PLARGE_INTEGER Offset, BOOLEAN ForceDirty, BOOLEAN PageOut)
NTSTATUS NTAPI MmCreatePeb(IN PEPROCESS Process, IN PINITIAL_PEB InitialPeb, OUT PPEB *BasePeb)
Definition: procsup.c:517
struct _MM_SECTION_SEGMENT MM_SECTION_SEGMENT
VOID NTAPI MmQuitNextSession(_Inout_ PVOID SessionEntry)
Definition: session.c:1030
SIZE_T MmDriverCommit
Definition: freelist.c:32
NTSTATUS NTAPI RtlpFindExportedRoutineByName(_In_ PVOID ImageBase, _In_ PCSTR ExportName, _Out_ PVOID *Function, _Out_opt_ PBOOLEAN IsForwarder, _In_ NTSTATUS NotFoundStatus)
ReactOS-only helper routine for RtlFindExportedRoutineByName(), that provides a finer granularity reg...
Definition: sysldr.c:309
VOID NTAPI MiInitBalancerThread(VOID)
Definition: balance.c:420
PVOID MmLastUnloadedDrivers
Definition: sysldr.c:31
NTSTATUS NTAPI MmWriteToSwapPage(SWAPENTRY SwapEntry, PFN_NUMBER Page)
Definition: pagefile.c:147
VOID NTAPI MmInitializeRegion(PLIST_ENTRY RegionListHead, SIZE_T Length, ULONG Type, ULONG Protect)
Definition: region.c:239
SIZE_T MmProcessCommit
Definition: freelist.c:33
NTSTATUS NTAPI MmCallDllInitialize(_In_ PLDR_DATA_TABLE_ENTRY LdrEntry, _In_ PLIST_ENTRY ModuleListHead)
Definition: sysldr.c:433
NTSTATUS NTAPI MmInitializeHandBuiltProcess(IN PEPROCESS Process, IN PULONG_PTR DirectoryTableBase)
Definition: procsup.c:1131
MM_DRIVER_VERIFIER_DATA MmVerifierData
Definition: drvmgmt.c:20
PMM_REGION NTAPI MmFindRegion(PVOID BaseAddress, PLIST_ENTRY RegionListHead, PVOID Address, PVOID *RegionBaseAddress)
Definition: region.c:257
VOID NTAPI MmDeleteAllRmaps(PFN_NUMBER Page, PVOID Context, VOID(*DeleteMapping)(PVOID Context, struct _EPROCESS *Process, PVOID Address))
PFN_NUMBER MmLowestPhysicalPage
Definition: meminit.c:30
NTSTATUS NTAPI MmAccessFaultSectionView(PMMSUPPORT AddressSpace, MEMORY_AREA *MemoryArea, PVOID Address, BOOLEAN Locked)
Definition: section.c:1915
FORCEINLINE VOID UpdateTotalCommittedPages(LONG Delta)
Definition: mm.h:871
struct _MEMORY_AREA * PMEMORY_AREA
UCHAR MmDisablePagingExecutive
Definition: mminit.c:25
ULONG_PTR SWAPENTRY
Definition: mm.h:57
NTSTATUS NTAPI MmUnloadSystemImage(IN PVOID ImageHandle)
Definition: sysldr.c:945
BOOLEAN NTAPI MmIsPageInUse(PFN_NUMBER Page)
Definition: freelist.c:558
NTSTATUS NTAPI MmSetExecuteOptions(IN ULONG ExecuteOptions)
Definition: pagfault.c:2695
PFN_NUMBER NTAPI MmGetPfnForProcess(struct _EPROCESS *Process, PVOID Address)
BOOLEAN NTAPI MmChangeKernelResourceSectionProtection(IN ULONG_PTR ProtectionMask)
Definition: sysldr.c:2331
MMPFNLIST MmModifiedNoWritePageListHead
Definition: pfnlist.c:47
NTSTATUS NTAPI MmGrowKernelStack(IN PVOID StackPointer)
Definition: procsup.c:476
FORCEINLINE VOID MmUnlockAddressSpace(PMMSUPPORT AddressSpace)
Definition: mm.h:1704
PVOID KernelVerifier
Definition: drvmgmt.c:28
struct _MM_REGION MM_REGION
PVOID NTAPI MmGetSessionById(_In_ ULONG SessionId)
Definition: session.c:1050
NTSTATUS NTAPI MmReadFromSwapPage(SWAPENTRY SwapEntry, PFN_NUMBER Page)
Definition: pagefile.c:204
BOOLEAN NTAPI MmArePagesResident(_In_ PEPROCESS Process, _In_ PVOID BaseAddress, _In_ ULONG Length)
Definition: section.c:4780
VOID NTAPI MmDeletePageFileMapping(struct _EPROCESS *Process, PVOID Address, SWAPENTRY *SwapEntry)
BOOLEAN NTAPI MmIsSpecialPoolAddress(IN PVOID P)
PVOID NTAPI MiMapPagesInZeroSpace(IN PMMPFN Pfn1, IN PFN_NUMBER NumberOfPages)
Definition: hypermap.c:111
NTSTATUS NTAPI MmSetMemoryPriorityProcess(IN PEPROCESS Process, IN UCHAR MemoryPriority)
Definition: procsup.c:486
VOID NTAPI MmDeleteTeb(struct _EPROCESS *Process, PTEB Teb)
BOOLEAN NTAPI MmUseSpecialPool(IN SIZE_T NumberOfBytes, IN ULONG Tag)
VOID NTAPI MmInitializeMemoryConsumer(ULONG Consumer, NTSTATUS(*Trim)(ULONG Target, ULONG Priority, PULONG NrFreed))
Definition: balance.c:57
VOID(* PMM_FREE_PAGE_FUNC)(PVOID Context, PMEMORY_AREA MemoryArea, PVOID Address, PFN_NUMBER Page, SWAPENTRY SwapEntry, BOOLEAN Dirty)
Definition: mm.h:527
PFN_NUMBER MmHighestPhysicalPage
Definition: meminit.c:31
NTSTATUS NTAPI MmFlushSegment(_In_ PSECTION_OBJECT_POINTERS SectionObjectPointer, _In_opt_ PLARGE_INTEGER Offset, _In_ ULONG Length, _Out_opt_ PIO_STATUS_BLOCK Iosb)
Definition: section.c:4945
SIZE_T MmtotalCommitLimitMaximum
Definition: freelist.c:36
NTSTATUS NTAPI MmExtendSection(_In_ PVOID Section, _Inout_ PLARGE_INTEGER NewSize)
Definition: section.c:5273
NTSTATUS NTAPI MmInitSectionImplementation(VOID)
Definition: section.c:2299
PVOID MiDebugMapping
Definition: mmdbg.c:30
FORCEINLINE PEPROCESS MmGetAddressSpaceOwner(IN PMMSUPPORT AddressSpace)
Definition: mm.h:1711
BOOLEAN NTAPI MmIsPagePresent(struct _EPROCESS *Process, PVOID Address)
struct _MMPAGING_FILE MMPAGING_FILE
VOID NTAPI MiInitializeSpecialPool(VOID)
Definition: special.c:123
ULONG NTAPI MmGetReferenceCountPage(PFN_NUMBER Page)
Definition: freelist.c:538
VOID NTAPI MmFreeSwapPage(SWAPENTRY Entry)
Definition: pagefile.c:291
_Out_ PKAPC_STATE ApcState
Definition: mm.h:1765
VOID NTAPI MmSetSavedSwapEntryPage(PFN_NUMBER Page, SWAPENTRY SavedSwapEntry)
Definition: freelist.c:483
NTSTATUS NTAPI MmGetFileNameForAddress(IN PVOID Address, OUT PUNICODE_STRING ModuleName)
Definition: section.c:1689
NTSTATUS NTAPI MmAlterRegion(PMMSUPPORT AddressSpace, PVOID BaseAddress, PLIST_ENTRY RegionListHead, PVOID StartAddress, SIZE_T Length, ULONG NewType, ULONG NewProtect, PMM_ALTER_REGION_FUNC AlterFunc)
Definition: region.c:108
NTSTATUS NTAPI MmMakePagesDirty(_In_ PEPROCESS Process, _In_ PVOID Address, _In_ ULONG Length)
Definition: section.c:5202
VOID NTAPI MmZeroPageThread(VOID)
Definition: zeropage.c:36
PVOID NTAPI MmCreateKernelStack(BOOLEAN GuiStack, UCHAR Node)
struct _MM_MEMORY_CONSUMER * PMM_MEMORY_CONSUMER
PFN_NUMBER MmAvailablePages
Definition: freelist.c:26
NTSTATUS NTAPI MmRequestPageMemoryConsumer(ULONG Consumer, BOOLEAN MyWait, PPFN_NUMBER AllocatedPage)
Definition: balance.c:313
VOID NTAPI _MmLockSectionSegment(PMM_SECTION_SEGMENT Segment, const char *file, int line)
Definition: data.c:98
NTSTATUS NTAPI MmPageOutSectionView(PMMSUPPORT AddressSpace, PMEMORY_AREA MemoryArea, PVOID Address, ULONG_PTR Entry)
#define MC_MAXIMUM
Definition: mm.h:116
NTSTATUS NTAPI MmMakeDataSectionResident(_In_ PSECTION_OBJECT_POINTERS SectionObjectPointer, _In_ LONGLONG Offset, _In_ ULONG Length, _In_ PLARGE_INTEGER ValidDataLength)
Definition: section.c:4925
SWAPENTRY NTAPI MmGetSavedSwapEntryPage(PFN_NUMBER Page)
Definition: freelist.c:499
BOOLEAN MiArchCreateProcessAddressSpace(_In_ PEPROCESS Process, _In_ PULONG_PTR DirectoryTableBase)
Definition: procsup.c:21
NTSTATUS NTAPI MmCreatePhysicalMapping(_Inout_opt_ PEPROCESS Process, _In_ PVOID Address, _In_ ULONG flProtect, _In_ PFN_NUMBER Page)
Definition: page.c:735
ULONG MmThrottleBottom
Definition: mminit.c:397
struct _MM_RMAP_ENTRY MM_RMAP_ENTRY
BOOLEAN NTAPI MmIsSpecialPoolAddressFree(IN PVOID P)
PVOID NTAPI MmAllocateSpecialPool(IN SIZE_T NumberOfBytes, IN ULONG Tag, IN POOL_TYPE PoolType, IN ULONG SpecialType)
NTSTATUS NTAPI MmCreateVirtualMapping(struct _EPROCESS *Process, PVOID Address, ULONG flProtect, PFN_NUMBER Page)
NTSTATUS NTAPI MmCreatePageFileMapping(struct _EPROCESS *Process, PVOID Address, SWAPENTRY SwapEntry)
NTSTATUS NTAPI MmGetExecuteOptions(IN PULONG ExecuteOptions)
Definition: pagfault.c:2653
NTSTATUS NTAPI MmMapViewInSystemSpaceEx(_In_ PVOID Section, _Outptr_result_bytebuffer_(*ViewSize) PVOID *MappedBase, _Inout_ PSIZE_T ViewSize, _Inout_ PLARGE_INTEGER SectionOffset, _In_ ULONG_PTR Flags)
Definition: section.c:4465
NTSTATUS NTAPI MmAccessFault(IN ULONG FaultCode, IN PVOID Address, IN KPROCESSOR_MODE Mode, IN PVOID TrapInformation)
Definition: mmfault.c:218
VOID NTAPI MmDeleteRmap(PFN_NUMBER Page, struct _EPROCESS *Process, PVOID Address)
BOOLEAN NTAPI MmInitSystem(IN ULONG Phase, IN PLOADER_PARAMETER_BLOCK LoaderBlock)
Definition: mminit.c:206
VOID NTAPI MmFreeSpecialPool(IN PVOID P)
struct _MM_SECTION_SEGMENT * PMM_SECTION_SEGMENT
ULONG_PTR NTAPI _MmGetPageEntrySectionSegment(PMM_SECTION_SEGMENT Segment, PLARGE_INTEGER Offset, const char *file, int line)
Definition: sptab.c:280
SIZE_T MmPagedPoolCommit
Definition: freelist.c:34
VOID NTAPI MiCheckAllProcessMemoryAreas(VOID)
VOID NTAPI MmInitializeRmapList(VOID)
Definition: rmap.c:38
PVOID NTAPI MmFindGap(PMMSUPPORT AddressSpace, SIZE_T Length, ULONG_PTR Granularity, BOOLEAN TopDown)
Definition: marea.c:215
SIZE_T MmSharedCommit
Definition: freelist.c:31
PVOID NTAPI RtlFindExportedRoutineByName(_In_ PVOID ImageBase, _In_ PCSTR ExportName)
Finds the address of a given named exported routine in a loaded image. Note that this function does n...
Definition: sysldr.c:401
ULONG MmNumberOfPagingFiles
Definition: pagefile.c:63
SIZE_T MmTotalCommittedPages
Definition: freelist.c:30
#define MAX_PAGING_FILES
Definition: mm.h:125
MMPFNLIST MmFreePageListHead
Definition: pfnlist.c:42
struct _MMFREE_POOL_ENTRY MMFREE_POOL_ENTRY
PFN_COUNT MiUsedSwapPages
Definition: pagefile.c:69
NTSTATUS NTAPI MmCheckSystemImage(IN HANDLE ImageHandle, IN BOOLEAN PurgeSection)
Definition: sysldr.c:2745
PFN_NUMBER NTAPI MmGetLRUNextUserPage(PFN_NUMBER PreviousPage, BOOLEAN MoveToLast)
Definition: freelist.c:125
ULONG NTAPI MiFreePoolPages(IN PVOID StartingAddress)
Definition: pool.c:918
KMUTANT MmSystemLoadLock
Definition: sysldr.c:26
SIZE_T MmPeakCommitment
Definition: freelist.c:35
NTSTATUS NTAPI MmReleasePageMemoryConsumer(ULONG Consumer, PFN_NUMBER Page)
Definition: balance.c:72
FORCEINLINE PMMSUPPORT MmGetKernelAddressSpace(VOID)
Definition: mm.h:1726
VOID NTAPI MmInitGlobalKernelPageDirectory(VOID)
Definition: page.c:277
VOID NTAPI MmInsertRmap(PFN_NUMBER Page, struct _EPROCESS *Process, PVOID Address)
struct _MMPFNENTRY MMPFNENTRY
BOOLEAN NTAPI MmCreateProcessAddressSpace(IN ULONG MinWs, IN PEPROCESS Dest, IN PULONG_PTR DirectoryTableBase)
Definition: page.c:136
NTSTATUS NTAPI MmPageOutPhysicalAddress(PFN_NUMBER Page)
Definition: rmap.c:51
_In_ SIZE_T QuotaToReturn
Definition: mm.h:675
PMEMORY_AREA NTAPI MmLocateMemoryAreaByRegion(PMMSUPPORT AddressSpace, PVOID Address, SIZE_T Length)
Definition: marea.c:106
VOID(* PMM_ALTER_REGION_FUNC)(PMMSUPPORT AddressSpace, PVOID BaseAddress, SIZE_T Length, ULONG OldType, ULONG OldProtect, ULONG NewType, ULONG NewProtect)
Definition: mm.h:516
NTSTATUS NTAPI MmCreatePhysicalMemorySection(VOID)
Definition: section.c:2208
struct _MM_REGION * PMM_REGION
VOID NTAPI MmSetRmapListHeadPage(PFN_NUMBER Page, struct _MM_RMAP_ENTRY *ListHead)
VOID NTAPI MmInitPagingFile(VOID)
Definition: pagefile.c:272
#define MI_SET_PROCESS(x)
Definition: mm.h:318
VOID NTAPI MmDeletePageTable(struct _EPROCESS *Process, PVOID Address)
VOID NTAPI MmInit1(VOID)
VOID NTAPI MmShowOutOfSpaceMessagePagingFile(VOID)
Definition: pagefile.c:136
RTL_BITMAP MiPfnBitMap
Definition: init.c:44
VOID NTAPI MmDeleteVirtualMapping(IN PEPROCESS Process, IN PVOID Address, OUT PBOOLEAN WasDirty, OUT PPFN_NUMBER Page)
Definition: page.c:177
#define L(x)
Definition: ntvdm.h:50
long LONG
Definition: pedump.c:60
unsigned short USHORT
Definition: pedump.c:61
ULONG MI_PFN_CURRENT_USAGE
Definition: pfnlist.c:63
CHAR MI_PFN_CURRENT_PROCESS_NAME[16]
Definition: pfnlist.c:64
static WCHAR Address[46]
Definition: ping.c:68
static KSPIN_LOCK PspQuotaLock
Definition: quota.c:18
DWORD LCID
Definition: nls.h:13
ULONG * PPFN_NUMBER
Definition: ke.h:9
ULONG PFN_NUMBER
Definition: ke.h:9
PLARGE_INTEGER BOOLEAN BOOLEAN PageOut
Definition: section.c:5031
PLARGE_INTEGER BOOLEAN ForceDirty
Definition: section.c:5029
PULONG MinorVersion OPTIONAL
Definition: CrossNt.h:68
base of all file and directory entries
Definition: entries.h:83
Definition: btrfs_drv.h:1876
Definition: typedefs.h:120
struct _MEMORY_AREA::@1800 SectionData
LONGLONG ViewOffset
Definition: mm.h:259
PMM_SECTION_SEGMENT Segment
Definition: mm.h:260
PVOID Vad
Definition: mm.h:255
LIST_ENTRY RegionListHead
Definition: mm.h:261
ULONG Flags
Definition: mm.h:252
ULONG Magic
Definition: mm.h:254
BOOLEAN DeleteInProgress
Definition: mm.h:253
ULONG Type
Definition: mm.h:251
MMVAD VadNode
Definition: mm.h:249
Definition: mm.h:473
ULONG Signature
Definition: mm.h:476
struct _MMFREE_POOL_ENTRY * Owner
Definition: mm.h:477
PFN_COUNT Size
Definition: mm.h:475
LIST_ENTRY List
Definition: mm.h:474
PFN_NUMBER MinimumSize
Definition: mm.h:503
UNICODE_STRING PageFileName
Definition: mm.h:507
PFN_NUMBER Size
Definition: mm.h:501
PRTL_BITMAP Bitmap
Definition: mm.h:508
PFN_NUMBER CurrentUsage
Definition: mm.h:505
PFN_NUMBER FreeSpace
Definition: mm.h:504
PFILE_OBJECT FileObject
Definition: mm.h:506
PFN_NUMBER MaximumSize
Definition: mm.h:502
HANDLE FileHandle
Definition: mm.h:509
USHORT RemovalRequested
Definition: mm.h:366
USHORT CacheAttribute
Definition: mm.h:367
USHORT PageColor
Definition: mm.h:364
USHORT PrototypePte
Definition: mm.h:363
USHORT Modified
Definition: mm.h:360
USHORT ReadInProgress
Definition: mm.h:361
USHORT PageLocation
Definition: mm.h:365
USHORT Rom
Definition: mm.h:368
USHORT ParityError
Definition: mm.h:369
USHORT WriteInProgress
Definition: mm.h:362
Definition: mm.h:442
PFN_NUMBER Total
Definition: mm.h:443
MMLISTS ListName
Definition: mm.h:444
PFN_NUMBER Blink
Definition: mm.h:446
PFN_NUMBER Flink
Definition: mm.h:445
Definition: mm.h:374
PMM_RMAP_ENTRY RmapListHead
Definition: mm.h:411
MMPTE OriginalPte
Definition: mm.h:407
MMWSLE Wsle
Definition: mm.h:434
ULONG_PTR MustBeCached
Definition: mm.h:423
SINGLE_LIST_ENTRY NextStackPfn
Definition: mm.h:381
union _MMPFN::@1801 u1
struct _MMPFN * NextLRU
Definition: mm.h:435
PFN_NUMBER Blink
Definition: mm.h:389
PMMPTE PteAddress
Definition: mm.h:386
NTSTATUS ReadStatus
Definition: mm.h:380
union _MMPFN::@1803 u3
union _MMPFN::@1802 u2
LONG AweReferenceCount
Definition: mm.h:408
PFN_NUMBER Flink
Definition: mm.h:377
ULONG WsIndex
Definition: mm.h:378
union _MMPFN::@1806 u4
MMPFNENTRY e1
Definition: mm.h:397
ULONG_PTR VerifierAllocation
Definition: mm.h:420
ULONG_PTR ShareCount
Definition: mm.h:390
ULONG_PTR EntireFrame
Definition: mm.h:415
struct _MMPFN * PreviousLRU
Definition: mm.h:436
ULONG_PTR InPageError
Definition: mm.h:419
ULONG_PTR Priority
Definition: mm.h:422
struct _MMPFN::@1803::@1809 e2
PKEVENT Event
Definition: mm.h:379
USHORT ReferenceCount
Definition: mm.h:396
USHORT ShortFlags
Definition: mm.h:402
SWAPENTRY SwapEntry
Definition: mm.h:384
ULONG_PTR AweAllocation
Definition: mm.h:421
ULONG_PTR PteFrame
Definition: mm.h:418
PMM_SECTION_SEGMENT Segments
Definition: mm.h:234
PFILE_OBJECT FileObject
Definition: mm.h:226
SECTION_IMAGE_INFORMATION ImageInformation
Definition: mm.h:231
NTSTATUS(* Trim)(ULONG Target, ULONG Priority, PULONG NrFreed)
Definition: mm.h:459
ULONG PagesTarget
Definition: mm.h:458
ULONG PagesUsed
Definition: mm.h:457
PMMPTE LastPteForPagedPool
Definition: mm.h:489
SIZE_T AllocatedPagedPool
Definition: mm.h:493
PRTL_BITMAP EndOfPagedPoolBitmap
Definition: mm.h:487
PRTL_BITMAP PagedPoolAllocationMap
Definition: mm.h:486
PMMPDE NextPdeForPagedPoolExpansion
Definition: mm.h:490
PMMPTE FirstPteForPagedPool
Definition: mm.h:488
ULONG PagedPoolHint
Definition: mm.h:491
SIZE_T PagedPoolCommit
Definition: mm.h:492
Definition: mm.h:463
LIST_ENTRY RegionListEntry
Definition: mm.h:467
ULONG Type
Definition: mm.h:464
SIZE_T Length
Definition: mm.h:466
ULONG Protect
Definition: mm.h:465
Definition: mm.h:266
PVOID Address
Definition: mm.h:269
PEPROCESS Process
Definition: mm.h:268
struct _MM_RMAP_ENTRY * Next
Definition: mm.h:267
LONG64 RefCount
Definition: mm.h:196
PULONG Flags
Definition: mm.h:205
ULONG_PTR VirtualAddress
Definition: mm.h:212
ULONG SectionCount
Definition: mm.h:203
LARGE_INTEGER RawLength
Definition: mm.h:200
ULONGLONG LastPage
Definition: mm.h:218
BOOLEAN Locked
Definition: mm.h:207
PLONG64 ReferenceCount
Definition: mm.h:202
FAST_MUTEX Lock
Definition: mm.h:199
PFILE_OBJECT FileObject
Definition: mm.h:197
ULONGLONG FileOffset
Definition: mm.h:211
ULONG SegFlags
Definition: mm.h:216
BOOLEAN WriteCopy
Definition: mm.h:206
ULONG Protection
Definition: mm.h:204
ULONG Characteristics
Definition: mm.h:213
struct _MM_SECTION_SEGMENT::@1799 Image
RTL_GENERIC_TABLE PageTable
Definition: mm.h:220
LARGE_INTEGER Length
Definition: mm.h:201
PULONG Buffer
Definition: typedefs.h:91
Definition: ntbasedef.h:636
Definition: compat.h:836
Definition: fci.c:127
Definition: parser.c:49
ULONG_PTR * PSIZE_T
Definition: typedefs.h:80
uint16_t * PWSTR
Definition: typedefs.h:56
uint32_t * PULONG_PTR
Definition: typedefs.h:65
uint32_t * PULONG
Definition: typedefs.h:59
int64_t LONG64
Definition: typedefs.h:68
unsigned char * PBOOLEAN
Definition: typedefs.h:53
INT POOL_TYPE
Definition: typedefs.h:78
int64_t LONGLONG
Definition: typedefs.h:68
#define NTAPI
Definition: typedefs.h:36
ULONG_PTR SIZE_T
Definition: typedefs.h:80
const char * PCSTR
Definition: typedefs.h:52
uint32_t ULONG_PTR
Definition: typedefs.h:65
#define IN
Definition: typedefs.h:39
#define CONTAINING_RECORD(address, type, field)
Definition: typedefs.h:260
uint32_t ULONG
Definition: typedefs.h:59
uint64_t ULONGLONG
Definition: typedefs.h:67
#define OUT
Definition: typedefs.h:40
Definition: dlist.c:348
_Must_inspect_result_ _In_ WDFCHILDLIST _In_ PWDF_CHILD_LIST_ITERATOR _Out_ WDFDEVICE _Inout_opt_ PWDF_CHILD_RETRIEVE_INFO Info
Definition: wdfchildlist.h:690
_Must_inspect_result_ _In_ WDFDEVICE _In_ DEVICE_REGISTRY_PROPERTY _In_ ULONG _Out_ PULONG ResultLength
Definition: wdfdevice.h:3776
_Must_inspect_result_ _In_ WDFDEVICE _In_ BOOLEAN _In_opt_ PVOID Tag
Definition: wdfdevice.h:4065
_Must_inspect_result_ _In_ WDFDEVICE _In_ DEVICE_REGISTRY_PROPERTY _In_ _Strict_type_match_ POOL_TYPE PoolType
Definition: wdfdevice.h:3815
_In_ WDFREQUEST _In_ WDFFILEOBJECT FileObject
Definition: wdfdevice.h:550
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
Definition: wdfdevice.h:4533
_Must_inspect_result_ _In_ WDFDMATRANSACTION _In_ PFN_WDF_PROGRAM_DMA _In_ WDF_DMA_DIRECTION _In_ PMDL _In_ PVOID VirtualAddress
_In_ WDFDEVICE _In_ PVOID _In_opt_ PMDL Mdl
_In_ WDFINTERRUPT _In_ WDF_INTERRUPT_POLICY _In_ WDF_INTERRUPT_PRIORITY Priority
Definition: wdfinterrupt.h:655
_In_ WDFMEMORY _Out_opt_ size_t * BufferSize
Definition: wdfmemory.h:254
_Must_inspect_result_ _In_ PWDFDEVICE_INIT _In_ PCUNICODE_STRING _In_ PCUNICODE_STRING _In_ LCID LocaleId
Definition: wdfpdo.h:437
_In_ WDFIOTARGET Target
Definition: wdfrequest.h:306
_In_ WDFREQUEST _In_ PIO_STACK_LOCATION Stack
Definition: wdfrequest.h:639
#define FORCEINLINE
Definition: wdftypes.h:67
_At_(*)(_In_ PWSK_CLIENT Client, _In_opt_ PUNICODE_STRING NodeName, _In_opt_ PUNICODE_STRING ServiceName, _In_opt_ ULONG NameSpace, _In_opt_ GUID *Provider, _In_opt_ PADDRINFOEXW Hints, _Outptr_ PADDRINFOEXW *Result, _In_opt_ PEPROCESS OwningProcess, _In_opt_ PETHREAD OwningThread, _Inout_ PIRP Irp Result)(Mem)) NTSTATUS(WSKAPI *PFN_WSK_GET_ADDRESS_INFO
Definition: wsk.h:409
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
_Use_decl_annotations_ VOID NTAPI MiInitializeWorkingSetList(_Inout_ PMMSUPPORT WorkingSet)
Definition: wslist.cpp:369
static ULONG Delta
Definition: xboxvideo.c:33
_Inout_ PVOID Segment
Definition: exfuncs.h:1101
FAST_MUTEX
Definition: extypes.h:17
_In_ ULONG _In_ PHYSICAL_ADDRESS _Inout_ PULONG AddressSpace
Definition: iofuncs.h:2274
_Must_inspect_result_ typedef _In_ PHYSICAL_ADDRESS _Inout_ PLARGE_INTEGER _Outptr_ PVOID * TargetAddress
Definition: iotypes.h:1037
* PFILE_OBJECT
Definition: iotypes.h:1998
_Must_inspect_result_ typedef _In_ PHYSICAL_ADDRESS SourceAddress
Definition: iotypes.h:1127
_Must_inspect_result_ typedef _In_ PHYSICAL_ADDRESS _Inout_ PLARGE_INTEGER NumberOfBytes
Definition: iotypes.h:1036
_Requires_lock_held_ Interrupt _Releases_lock_ Interrupt _In_ _IRQL_restores_ KIRQL OldIrql
Definition: kefuncs.h:778
_Out_ PCLIENT_ID ClientId
Definition: kefuncs.h:1151
@ FreePage
Definition: ketypes.h:416
CCHAR KPROCESSOR_MODE
Definition: ketypes.h:7
* PKAPC_STATE
Definition: ketypes.h:1409
@ LockQueuePfnLock
Definition: ketypes.h:660
_Must_inspect_result_ _Outptr_result_bytebuffer_ ViewSize PVOID * MappedBase
Definition: mmfuncs.h:492
_Must_inspect_result_ _In_ ULONG NewProtect
Definition: mmfuncs.h:682
ULONG PFN_COUNT
Definition: mmtypes.h:102
_In_ KPROCESSOR_MODE PreviousMode
Definition: sefuncs.h:103
unsigned char UCHAR
Definition: xmlstorage.h:181
__wchar_t WCHAR
Definition: xmlstorage.h:180
char CHAR
Definition: xmlstorage.h:175
_In_ HANDLE _Outptr_result_bytebuffer_ ViewSize PVOID _In_ ULONG_PTR _In_ SIZE_T _Inout_opt_ PLARGE_INTEGER _Inout_ PSIZE_T _In_ SECTION_INHERIT _In_ ULONG _In_ ULONG Protect
Definition: zwfuncs.h:221