Merge from branch ReactX to Trunk,
[reactos.git] / reactos / include / ndk / mmtypes.h
1 /*++ NDK Version: 0098
2
3 Copyright (c) Alex Ionescu. All rights reserved.
4
5 Header Name:
6
7 mmtypes.h
8
9 Abstract:
10
11 Type definitions for the Memory Manager
12
13 Author:
14
15 Alex Ionescu (alexi@tinykrnl.org) - Updated - 27-Feb-2006
16
17 --*/
18
19 #ifndef _MMTYPES_H
20 #define _MMTYPES_H
21
22 //
23 // Dependencies
24 //
25 #include <umtypes.h>
26 #include <arch/mmtypes.h>
27 #include <extypes.h>
28
29 //
30 // Page-Rounding Macros
31 //
32 #define PAGE_ROUND_DOWN(x) \
33 (((ULONG_PTR)(x))&(~(PAGE_SIZE-1)))
34 #define PAGE_ROUND_UP(x) \
35 ( (((ULONG_PTR)(x)) + PAGE_SIZE-1) & (~(PAGE_SIZE-1)) )
36 #ifdef NTOS_MODE_USER
37 #define ROUND_TO_PAGES(Size) \
38 (((ULONG_PTR)(Size) + PAGE_SIZE - 1) & ~(PAGE_SIZE - 1))
39 #endif
40 #define ROUND_TO_ALLOCATION_GRANULARITY(Size) \
41 (((ULONG_PTR)(Size) + MM_ALLOCATION_GRANULARITY - 1) \
42 & ~(MM_ALLOCATION_GRANULARITY - 1))
43
44 //
45 // Macro for generating pool tags
46 //
47 #define TAG(A, B, C, D) \
48 (ULONG)(((A)<<0) + ((B)<<8) + ((C)<<16) + ((D)<<24))
49
50 #ifndef NTOS_MODE_USER
51
52 //
53 // Virtual Memory Flags
54 //
55 #define MEM_WRITE_WATCH 0x200000
56 #define MEM_PHYSICAL 0x400000
57 #define MEM_ROTATE 0x800000
58 #define MEM_IMAGE SEC_IMAGE
59 #define MEM_DOS_LIM 0x40000000
60
61 //
62 // Section Flags for NtCreateSection
63 //
64 #define SEC_NO_CHANGE 0x400000
65 #define SEC_FILE 0x800000
66 #define SEC_IMAGE 0x1000000
67 #define SEC_PROTECTED_IMAGE 0x2000000
68 #define SEC_RESERVE 0x4000000
69 #define SEC_COMMIT 0x8000000
70 #define SEC_NOCACHE 0x10000000
71 #define SEC_WRITECOMBINE 0x40000000
72 #define SEC_LARGE_PAGES 0x80000000
73 #else
74 #define SEC_BASED 0x200000
75
76 //
77 // Section Inherit Flags for NtCreateSection
78 //
79 typedef enum _SECTION_INHERIT
80 {
81 ViewShare = 1,
82 ViewUnmap = 2
83 } SECTION_INHERIT;
84
85 //
86 // Pool Types
87 //
88 typedef enum _POOL_TYPE
89 {
90 NonPagedPool,
91 PagedPool,
92 NonPagedPoolMustSucceed,
93 DontUseThisType,
94 NonPagedPoolCacheAligned,
95 PagedPoolCacheAligned,
96 NonPagedPoolCacheAlignedMustS,
97 MaxPoolType,
98 NonPagedPoolSession = 32,
99 PagedPoolSession,
100 NonPagedPoolMustSucceedSession,
101 DontUseThisTypeSession,
102 NonPagedPoolCacheAlignedSession,
103 PagedPoolCacheAlignedSession,
104 NonPagedPoolCacheAlignedMustSSession
105 } POOL_TYPE;
106 #endif
107
108 //
109 // Per Processor Non Paged Lookaside List IDs
110 //
111 typedef enum _PP_NPAGED_LOOKASIDE_NUMBER
112 {
113 LookasideSmallIrpList = 0,
114 LookasideLargeIrpList = 1,
115 LookasideMdlList = 2,
116 LookasideCreateInfoList = 3,
117 LookasideNameBufferList = 4,
118 LookasideTwilightList = 5,
119 LookasideCompletionList = 6,
120 LookasideMaximumList = 7
121 } PP_NPAGED_LOOKASIDE_NUMBER;
122
123 //
124 // Memory Information Classes for NtQueryVirtualMemory
125 //
126 typedef enum _MEMORY_INFORMATION_CLASS
127 {
128 MemoryBasicInformation,
129 MemoryWorkingSetList,
130 MemorySectionName,
131 MemoryBasicVlmInformation
132 } MEMORY_INFORMATION_CLASS;
133
134 //
135 // Section Information Clasess for NtQuerySection
136 //
137 typedef enum _SECTION_INFORMATION_CLASS
138 {
139 SectionBasicInformation,
140 SectionImageInformation,
141 } SECTION_INFORMATION_CLASS;
142
143 #ifdef NTOS_MODE_USER
144
145 //
146 // Virtual Memory Counters
147 //
148 typedef struct _VM_COUNTERS
149 {
150 SIZE_T PeakVirtualSize;
151 SIZE_T VirtualSize;
152 ULONG PageFaultCount;
153 SIZE_T PeakWorkingSetSize;
154 SIZE_T WorkingSetSize;
155 SIZE_T QuotaPeakPagedPoolUsage;
156 SIZE_T QuotaPagedPoolUsage;
157 SIZE_T QuotaPeakNonPagedPoolUsage;
158 SIZE_T QuotaNonPagedPoolUsage;
159 SIZE_T PagefileUsage;
160 SIZE_T PeakPagefileUsage;
161 } VM_COUNTERS, *PVM_COUNTERS;
162
163 typedef struct _VM_COUNTERS_EX
164 {
165 SIZE_T PeakVirtualSize;
166 SIZE_T VirtualSize;
167 ULONG PageFaultCount;
168 SIZE_T PeakWorkingSetSize;
169 SIZE_T WorkingSetSize;
170 SIZE_T QuotaPeakPagedPoolUsage;
171 SIZE_T QuotaPagedPoolUsage;
172 SIZE_T QuotaPeakNonPagedPoolUsage;
173 SIZE_T QuotaNonPagedPoolUsage;
174 SIZE_T PagefileUsage;
175 SIZE_T PeakPagefileUsage;
176 SIZE_T PrivateUsage;
177 } VM_COUNTERS_EX, *PVM_COUNTERS_EX;
178 #endif
179
180 //
181 // List of Working Sets
182 //
183 typedef struct _MEMORY_WORKING_SET_LIST
184 {
185 ULONG NumberOfPages;
186 ULONG WorkingSetList[1];
187 } MEMORY_WORKING_SET_LIST, *PMEMORY_WORKING_SET_LIST;
188
189 //
190 // Memory Information Structures for NtQueryVirtualMemory
191 //
192 typedef struct
193 {
194 UNICODE_STRING SectionFileName;
195 WCHAR NameBuffer[ANYSIZE_ARRAY];
196 } MEMORY_SECTION_NAME, *PMEMORY_SECTION_NAME;
197
198 //
199 // Section Information Structures for NtQuerySection
200 //
201 typedef struct _SECTION_BASIC_INFORMATION
202 {
203 PVOID BaseAddress;
204 ULONG Attributes;
205 LARGE_INTEGER Size;
206 } SECTION_BASIC_INFORMATION, *PSECTION_BASIC_INFORMATION;
207
208 typedef struct _SECTION_IMAGE_INFORMATION
209 {
210 PVOID TransferAddress;
211 ULONG ZeroBits;
212 ULONG MaximumStackSize;
213 ULONG CommittedStackSize;
214 ULONG SubsystemType;
215 USHORT SubSystemMinorVersion;
216 USHORT SubSystemMajorVersion;
217 ULONG GpValue;
218 USHORT ImageCharacteristics;
219 USHORT DllChracteristics;
220 USHORT Machine;
221 UCHAR ImageContainsCode;
222 UCHAR Spare1;
223 ULONG LoaderFlags;
224 ULONG ImageFileSIze;
225 ULONG Reserved[1];
226 } SECTION_IMAGE_INFORMATION, *PSECTION_IMAGE_INFORMATION;
227
228 #ifndef NTOS_MODE_USER
229
230 //
231 // PTE Structures
232 //
233 typedef struct _MMPTE
234 {
235 union
236 {
237 ULONG Long;
238 HARDWARE_PTE Flush;
239 MMPTE_HARDWARE Hard;
240 MMPTE_PROTOTYPE Proto;
241 MMPTE_SOFTWARE Soft;
242 MMPTE_TRANSITION Trans;
243 MMPTE_SUBSECTION Subsect;
244 MMPTE_LIST List;
245 } u;
246 } MMPTE, *PMMPTE;
247
248 //
249 // Section Extension Information
250 //
251 typedef struct _MMEXTEND_INFO
252 {
253 ULONGLONG CommittedSize;
254 ULONG ReferenceCount;
255 } MMEXTEND_INFO, *PMMEXTEND_INFO;
256
257 //
258 // Segment and Segment Flags
259 //
260 typedef struct _SEGMENT_FLAGS
261 {
262 ULONG TotalNumberOfPtes4132:10;
263 ULONG ExtraSharedWowSubsections:1;
264 ULONG LargePages:1;
265 ULONG Spare:20;
266 } SEGMENT_FLAGS, *PSEGMENT_FLAGS;
267
268 typedef struct _SEGMENT
269 {
270 struct _CONTROL_AREA *ControlArea;
271 ULONG TotalNumberOfPtes;
272 ULONG NonExtendedPtes;
273 ULONG Spare0;
274 ULONGLONG SizeOfSegment;
275 MMPTE SegmentPteTemplate;
276 ULONG NumberOfCommittedPages;
277 PMMEXTEND_INFO ExtendInfo;
278 SEGMENT_FLAGS SegmentFlags;
279 PVOID BaseAddress;
280 union
281 {
282 SIZE_T ImageCommitment;
283 PEPROCESS CreatingProcess;
284 } u1;
285 union
286 {
287 PSECTION_IMAGE_INFORMATION ImageInformation;
288 PVOID FirstMappedVa;
289 } u2;
290 PMMPTE PrototypePte;
291 MMPTE ThePtes[1];
292 } SEGMENT, *PSEGMENT;
293
294 //
295 // Event Counter Structure
296 //
297 typedef struct _EVENT_COUNTER
298 {
299 ULONG RefCount;
300 KEVENT Event;
301 LIST_ENTRY ListEntry;
302 } EVENT_COUNTER, *PEVENT_COUNTER;
303
304 //
305 // Flags
306 //
307 typedef struct _MMSECTION_FLAGS
308 {
309 ULONG BeingDeleted:1;
310 ULONG BeingCreated:1;
311 ULONG BeingPurged:1;
312 ULONG NoModifiedWriting:1;
313 ULONG FailAllIo:1;
314 ULONG Image:1;
315 ULONG Based:1;
316 ULONG File:1;
317 ULONG Networked:1;
318 ULONG NoCache:1;
319 ULONG PhysicalMemory:1;
320 ULONG CopyOnWrite:1;
321 ULONG Reserve:1;
322 ULONG Commit:1;
323 ULONG FloppyMedia:1;
324 ULONG WasPurged:1;
325 ULONG UserReference:1;
326 ULONG GlobalMemory:1;
327 ULONG DeleteOnClose:1;
328 ULONG FilePointerNull:1;
329 ULONG DebugSymbolsLoaded:1;
330 ULONG SetMappedFileIoComplete:1;
331 ULONG CollidedFlush:1;
332 ULONG NoChange:1;
333 ULONG filler0:1;
334 ULONG ImageMappedInSystemSpace:1;
335 ULONG UserWritable:1;
336 ULONG Accessed:1;
337 ULONG GlobalOnlyPerSession:1;
338 ULONG Rom:1;
339 ULONG WriteCombined:1;
340 ULONG filler:1;
341 } MMSECTION_FLAGS, *PMMSECTION_FLAGS;
342
343 typedef struct _MMSUBSECTION_FLAGS
344 {
345 ULONG ReadOnly:1;
346 ULONG ReadWrite:1;
347 ULONG SubsectionStatic:1;
348 ULONG GlobalMemory:1;
349 ULONG Protection:5;
350 ULONG Spare:1;
351 ULONG StartingSector4132:10;
352 ULONG SectorEndOffset:12;
353 } MMSUBSECTION_FLAGS, *PMMSUBSECTION_FLAGS;
354
355 typedef struct _MMSUBSECTION_FLAGS2
356 {
357 ULONG SubsectionAccessed:1;
358 ULONG SubsectionConverted:1;
359 ULONG Reserved:30;
360 } MMSUBSECTION_FLAGS2;
361
362 //
363 // Control Area Structures
364 //
365 typedef struct _CONTROL_AREA
366 {
367 PSEGMENT Segment;
368 LIST_ENTRY DereferenceList;
369 ULONG NumberOfSectionReferences;
370 ULONG NumberOfPfnReferences;
371 ULONG NumberOfMappedViews;
372 ULONG NumberOfSystemCacheViews;
373 ULONG NumberOfUserReferences;
374 union
375 {
376 ULONG LongFlags;
377 MMSECTION_FLAGS Flags;
378 } u;
379 PFILE_OBJECT FilePointer;
380 PEVENT_COUNTER WaitingForDeletion;
381 USHORT ModifiedWriteCount;
382 USHORT FlushInProgressCount;
383 ULONG WritableUserReferences;
384 ULONG QuadwordPad;
385 } CONTROL_AREA, *PCONTROL_AREA;
386
387 typedef struct _LARGE_CONTROL_AREA
388 {
389 PSEGMENT Segment;
390 LIST_ENTRY DereferenceList;
391 ULONG NumberOfSectionReferences;
392 ULONG NumberOfPfnReferences;
393 ULONG NumberOfMappedViews;
394 ULONG NumberOfSystemCacheViews;
395 ULONG NumberOfUserReferences;
396 union
397 {
398 ULONG LongFlags;
399 MMSECTION_FLAGS Flags;
400 } u;
401 PFILE_OBJECT FilePointer;
402 PEVENT_COUNTER WaitingForDeletion;
403 USHORT ModifiedWriteCount;
404 USHORT FlushInProgressCount;
405 ULONG WritableUserReferences;
406 ULONG QuadwordPad;
407 ULONG StartingFrame;
408 LIST_ENTRY UserGlobalList;
409 ULONG SessionId;
410 } LARGE_CONTROL_AREA, *PLARGE_CONTROL_AREA;
411
412 //
413 // Subsection and Mapped Subsection
414 //
415 typedef struct _SUBSECTION
416 {
417 PCONTROL_AREA ControlArea;
418 union
419 {
420 ULONG LongFlags;
421 MMSUBSECTION_FLAGS SubsectionFlags;
422 } u;
423 ULONG StartingSector;
424 ULONG NumberOfFullSectors;
425 PMMPTE SubsectionBase;
426 ULONG UnusedPtes;
427 ULONG PtesInSubsection;
428 struct _SUBSECTION *NextSubsection;
429 } SUBSECTION, *PSUBSECTION;
430
431 typedef struct _MSUBSECTION
432 {
433 PCONTROL_AREA ControlArea;
434 union
435 {
436 ULONG LongFlags;
437 MMSUBSECTION_FLAGS SubsectionFlags;
438 } u;
439 ULONG StartingSector;
440 ULONG NumberOfFullSectors;
441 PMMPTE SubsectionBase;
442 ULONG UnusedPtes;
443 ULONG PtesInSubsection;
444 struct _SUBSECTION *NextSubsection;
445 LIST_ENTRY DereferenceList;
446 ULONG_PTR NumberOfMappedViews;
447 union
448 {
449 ULONG LongFlags2;
450 MMSUBSECTION_FLAGS2 SubsectionFlags2;
451 } u2;
452 } MSUBSECTION, *PMSUBSECTION;
453
454 //
455 // Segment Object
456 //
457 typedef struct _SEGMENT_OBJECT
458 {
459 PVOID BaseAddress;
460 ULONG TotalNumberOfPtes;
461 LARGE_INTEGER SizeOfSegment;
462 ULONG NonExtendedPtes;
463 ULONG ImageCommitment;
464 PCONTROL_AREA ControlArea;
465 PSUBSECTION Subsection;
466 PLARGE_CONTROL_AREA LargeControlArea;
467 PMMSECTION_FLAGS MmSectionFlags;
468 PMMSUBSECTION_FLAGS MmSubSectionFlags;
469 } SEGMENT_OBJECT, *PSEGMENT_OBJECT;
470
471 //
472 // Section Object
473 //
474 typedef struct _SECTION_OBJECT
475 {
476 PVOID StartingVa;
477 PVOID EndingVa;
478 PVOID LeftChild;
479 PVOID RightChild;
480 PSEGMENT_OBJECT Segment;
481 } SECTION_OBJECT, *PSECTION_OBJECT;
482
483 //
484 // Generic Address Range Structure
485 //
486 typedef struct _ADDRESS_RANGE
487 {
488 ULONG BaseAddrLow;
489 ULONG BaseAddrHigh;
490 ULONG LengthLow;
491 ULONG LengthHigh;
492 ULONG Type;
493 } ADDRESS_RANGE, *PADDRESS_RANGE;
494
495 //
496 // Node in Memory Manager's AVL Table
497 //
498 typedef struct _MMADDRESS_NODE
499 {
500 union
501 {
502 ULONG Balance:2;
503 struct _MMADDRESS_NODE *Parent;
504 } u1;
505 struct _MMADDRESS_NODE *LeftChild;
506 struct _MMADDRESS_NODE *RightChild;
507 ULONG StartingVpn;
508 ULONG EndingVpn;
509 } MMADDRESS_NODE, *PMMADDRESS_NODE;
510
511 //
512 // Memory Manager AVL Table for VADs and other descriptors
513 //
514 typedef struct _MM_AVL_TABLE
515 {
516 MMADDRESS_NODE BalancedRoot;
517 ULONG DepthOfTree:5;
518 ULONG Unused:3;
519 ULONG NumberGenericTableElements:24;
520 PVOID NodeHint;
521 PVOID NodeFreeHint;
522 } MM_AVL_TABLE, *PMM_AVL_TABLE;
523
524 //
525 // Actual Section Object
526 //
527 typedef struct _SECTION
528 {
529 MMADDRESS_NODE Address;
530 PSEGMENT Segment;
531 LARGE_INTEGER SizeOfSection;
532 union
533 {
534 ULONG LongFlags;
535 MMSECTION_FLAGS Flags;
536 } u;
537 ULONG InitialPageProtection;
538 } SECTION, *PSECTION;
539
540 //
541 // Memory Manager Working Set Structures
542 //
543 typedef struct _MMWSLENTRY
544 {
545 ULONG Valid:1;
546 ULONG LockedInWs:1;
547 ULONG LockedInMemory:1;
548 ULONG Protection:5;
549 ULONG Hashed:1;
550 ULONG Direct:1;
551 ULONG Age:2;
552 ULONG VirtualPageNumber:14;
553 } MMWSLENTRY, *PMMWSLENTRY;
554
555 typedef struct _MMWSLE
556 {
557 union
558 {
559 PVOID VirtualAddress;
560 ULONG Long;
561 MMWSLENTRY e1;
562 } u1;
563 } MMWSLE, *PMMWSLE;
564
565 typedef struct _MMWSLE_HASH
566 {
567 PVOID Key;
568 ULONG Index;
569 } MMWSLE_HASH, *PMMWSLE_HASH;
570
571 typedef struct _MMWSL
572 {
573 ULONG FirstFree;
574 ULONG FirstDynamic;
575 ULONG LastEntry;
576 ULONG NextSlot;
577 PMMWSLE Wsle;
578 ULONG LastInitializedWsle;
579 ULONG NonDirectCount;
580 PMMWSLE_HASH HashTable;
581 ULONG HashTableSize;
582 ULONG NumberOfCommittedPageTables;
583 PVOID HashTableStart;
584 PVOID HighestPermittedHashAddress;
585 ULONG NumberOfImageWaiters;
586 ULONG VadBitMapHint;
587 USHORT UsedPageTableEntries[768];
588 ULONG CommittedPageTables[24];
589 } MMWSL, *PMMWSL;
590
591 //
592 // Flags for Memory Support Structure
593 //
594 typedef struct _MMSUPPORT_FLAGS
595 {
596 ULONG SessionSpace:1;
597 ULONG BeingTrimmed:1;
598 ULONG SessionLeader:1;
599 ULONG TrimHard:1;
600 ULONG MaximumWorkingSetHard:1;
601 ULONG ForceTrim:1;
602 ULONG MinimumworkingSetHard:1;
603 ULONG Available0:1;
604 ULONG MemoryPriority:8;
605 ULONG GrowWsleHash:1;
606 ULONG AcquiredUnsafe:1;
607 ULONG Available:14;
608 } MMSUPPORT_FLAGS, *PMMSUPPORT_FLAGS;
609
610 //
611 // Per-Process Memory Manager Data
612 //
613 typedef struct _MMSUPPORT
614 {
615 #if (NTDDI_VERSION >= NTDDI_WS03)
616 LIST_ENTRY WorkingSetExpansionLinks;
617 #endif
618 #if (NTDDI_VERSION >= NTDDI_LONGHORN)
619 USHORT LastTrimpStamp;
620 USHORT NextPageColor;
621 #else
622 LARGE_INTEGER LastTrimTime;
623 #endif
624 MMSUPPORT_FLAGS Flags;
625 ULONG PageFaultCount;
626 ULONG PeakWorkingSetSize;
627 #if (NTDDI_VERSION >= NTDDI_LONGHORN)
628 ULONG Spare0;
629 #else
630 ULONG GrowthSinceLastEstimate;
631 #endif
632 ULONG MinimumWorkingSetSize;
633 ULONG MaximumWorkingSetSize;
634 PMMWSL VmWorkingSetList;
635 #if (NTDDI_VERSION < NTDDI_WS03)
636 LIST_ENTRY WorkingSetExpansionLinks;
637 #endif
638 ULONG Claim;
639 #if (NTDDI_VERSION >= NTDDI_LONGHORN)
640 ULONG Spare;
641 ULONG WorkingSetPrivateSize;
642 ULONG WorkingSetSizeOverhead;
643 #else
644 ULONG NextEstimationSlot;
645 ULONG NextAgingSlot;
646 ULONG EstimatedAvailable;
647 #endif
648 ULONG WorkingSetSize;
649 #if (NTDDI_VERSION >= NTDDI_LONGHORN)
650 PKEVENT ExitEvent;
651 #endif
652 EX_PUSH_LOCK WorkingSetMutex;
653 #if (NTDDI_VERSION >= NTDDI_LONGHORN)
654 PVOID AccessLog;
655 #endif
656 } MMSUPPORT, *PMMSUPPORT;
657
658 //
659 // Memory Information Types
660 //
661 typedef struct _MEMORY_BASIC_INFORMATION
662 {
663 PVOID BaseAddress;
664 PVOID AllocationBase;
665 ULONG AllocationProtect;
666 ULONG RegionSize;
667 ULONG State;
668 ULONG Protect;
669 ULONG Type;
670 } MEMORY_BASIC_INFORMATION,*PMEMORY_BASIC_INFORMATION;
671
672 //
673 // Driver Verifier Data
674 //
675 typedef struct _MM_DRIVER_VERIFIER_DATA
676 {
677 ULONG Level;
678 ULONG RaiseIrqls;
679 ULONG AcquireSpinLocks;
680 ULONG SynchronizeExecutions;
681 ULONG AllocationsAttempted;
682 ULONG AllocationsSucceeded;
683 ULONG AllocationsSucceededSpecialPool;
684 ULONG AllocationsWithNoTag;
685 ULONG TrimRequests;
686 ULONG Trims;
687 ULONG AllocationsFailed;
688 ULONG AllocationsFailedDeliberately;
689 ULONG Loads;
690 ULONG Unloads;
691 ULONG UnTrackedPool;
692 ULONG UserTrims;
693 ULONG CurrentPagedPoolAllocations;
694 ULONG CurrentNonPagedPoolAllocations;
695 ULONG PeakPagedPoolAllocations;
696 ULONG PeakNonPagedPoolAllocations;
697 ULONG PagedBytes;
698 ULONG NonPagedBytes;
699 ULONG PeakPagedBytes;
700 ULONG PeakNonPagedBytes;
701 ULONG BurstAllocationsFailedDeliberately;
702 ULONG SessionTrims;
703 ULONG Reserved[2];
704 } MM_DRIVER_VERIFIER_DATA, *PMM_DRIVER_VERIFIER_DATA;
705
706 //
707 // Internal Driver Verifier Table Data
708 //
709 typedef struct _DRIVER_SPECIFIED_VERIFIER_THUNKS
710 {
711 LIST_ENTRY ListEntry;
712 struct _LDR_DATA_TABLE_ENTRY *DataTableEntry;
713 ULONG NumberOfThunks;
714 } DRIVER_SPECIFIED_VERIFIER_THUNKS, *PDRIVER_SPECIFIED_VERIFIER_THUNKS;
715
716 //
717 // Default heap size values. For user mode, these values are copied to a new
718 // process's PEB by the kernel in MmCreatePeb. In kernel mode, RtlCreateHeap
719 // reads these variables directly.
720 //
721 // These variables should be considered "const"; they are written only once,
722 // during MmInitSystem.
723 //
724 extern SIZE_T MmHeapSegmentReserve;
725 extern SIZE_T MmHeapSegmentCommit;
726 extern SIZE_T MmHeapDeCommitTotalFreeThreshold;
727 extern SIZE_T MmHeapDeCommitFreeBlockThreshold;
728
729 //
730 // Section Object Type
731 //
732 extern POBJECT_TYPE MmSectionObjectType;
733
734 #endif // !NTOS_MODE_USER
735
736 #endif // _MMTYPES_H