3 Copyright (c) Alex Ionescu. All rights reserved.
11 Type definitions for the Memory Manager
15 Alex Ionescu (alexi@tinykrnl.org) - Updated - 27-Feb-2006
26 #include <arch/mmtypes.h>
34 // Page-Rounding Macros
36 #define PAGE_ROUND_DOWN(x) \
37 (((ULONG_PTR)(x))&(~(PAGE_SIZE-1)))
38 #define PAGE_ROUND_UP(x) \
39 ( (((ULONG_PTR)(x)) + PAGE_SIZE-1) & (~(PAGE_SIZE-1)) )
41 #define ROUND_TO_PAGES(Size) \
42 (((ULONG_PTR)(Size) + PAGE_SIZE - 1) & ~(PAGE_SIZE - 1))
44 #define ROUND_TO_ALLOCATION_GRANULARITY(Size) \
45 (((ULONG_PTR)(Size) + MM_ALLOCATION_GRANULARITY - 1) \
46 & ~(MM_ALLOCATION_GRANULARITY - 1))
51 #define MMPFNUSE_PROCESSPRIVATE 0
52 #define MMPFNUSE_FILE 1
53 #define MMPFNUSE_PAGEFILEMAPPED 2
54 #define MMPFNUSE_PAGETABLE 3
55 #define MMPFNUSE_PAGEDPOOL 4
56 #define MMPFNUSE_NONPAGEDPOOL 5
57 #define MMPFNUSE_SYSTEMPTE 6
58 #define MMPFNUSE_SESSIONPRIVATE 7
59 #define MMPFNUSE_METAFILE 8
60 #define MMPFNUSE_AWEPAGE 9
61 #define MMPFNUSE_DRIVERLOCKPAGE 10
62 #define MMPFNUSE_KERNELSTACK 11
65 // Lock/Unlock Virtuam Memory Flags
71 // Flags for ProcessExecutionOptions
73 #define MEM_EXECUTE_OPTION_DISABLE 0x1
74 #define MEM_EXECUTE_OPTION_ENABLE 0x2
75 #define MEM_EXECUTE_OPTION_DISABLE_THUNK_EMULATION 0x4
76 #define MEM_EXECUTE_OPTION_PERMANENT 0x8
77 #define MEM_EXECUTE_OPTION_EXECUTE_DISPATCH_ENABLE 0x10
78 #define MEM_EXECUTE_OPTION_IMAGE_DISPATCH_ENABLE 0x20
79 #define MEM_EXECUTE_OPTION_VALID_FLAGS 0x3F
81 #ifndef NTOS_MODE_USER
83 // Virtual Memory Flags
85 #define MEM_WRITE_WATCH 0x200000
86 #define MEM_PHYSICAL 0x400000
87 #define MEM_ROTATE 0x800000
88 #define MEM_IMAGE SEC_IMAGE
89 #define MEM_DOS_LIM 0x40000000
92 // Section Flags for NtCreateSection
94 #define SEC_NO_CHANGE 0x400000
95 #define SEC_FILE 0x800000
96 #define SEC_IMAGE 0x1000000
97 #define SEC_PROTECTED_IMAGE 0x2000000
98 #define SEC_RESERVE 0x4000000
99 #define SEC_COMMIT 0x8000000
100 #define SEC_NOCACHE 0x10000000
101 #define SEC_WRITECOMBINE 0x40000000
102 #define SEC_LARGE_PAGES 0x80000000
104 #define SEC_BASED 0x200000
107 // Section Inherit Flags for NtCreateSection
109 typedef enum _SECTION_INHERIT
118 typedef enum _POOL_TYPE
122 NonPagedPoolMustSucceed
,
124 NonPagedPoolCacheAligned
,
125 PagedPoolCacheAligned
,
126 NonPagedPoolCacheAlignedMustS
,
128 NonPagedPoolSession
= 32,
130 NonPagedPoolMustSucceedSession
,
131 DontUseThisTypeSession
,
132 NonPagedPoolCacheAlignedSession
,
133 PagedPoolCacheAlignedSession
,
134 NonPagedPoolCacheAlignedMustSSession
139 // Memory Manager Page Lists
141 typedef enum _MMLISTS
146 ModifiedPageList
= 3,
147 ModifiedNoWritePageList
= 4,
154 // Per Processor Non Paged Lookaside List IDs
156 typedef enum _PP_NPAGED_LOOKASIDE_NUMBER
158 LookasideSmallIrpList
= 0,
159 LookasideLargeIrpList
= 1,
160 LookasideMdlList
= 2,
161 LookasideCreateInfoList
= 3,
162 LookasideNameBufferList
= 4,
163 LookasideTwilightList
= 5,
164 LookasideCompletionList
= 6,
165 LookasideMaximumList
= 7
166 } PP_NPAGED_LOOKASIDE_NUMBER
;
169 // Memory Information Classes for NtQueryVirtualMemory
171 typedef enum _MEMORY_INFORMATION_CLASS
173 MemoryBasicInformation
,
174 MemoryWorkingSetList
,
176 MemoryBasicVlmInformation
,
177 MemoryWorkingSetExList
178 } MEMORY_INFORMATION_CLASS
;
181 // Section Information Clasess for NtQuerySection
183 typedef enum _SECTION_INFORMATION_CLASS
185 SectionBasicInformation
,
186 SectionImageInformation
,
187 } SECTION_INFORMATION_CLASS
;
192 typedef enum _MI_VAD_TYPE
195 VadDevicePhysicalMemory
,
202 } MI_VAD_TYPE
, *PMI_VAD_TYPE
;
204 #ifdef NTOS_MODE_USER
207 // Virtual Memory Counters
209 typedef struct _VM_COUNTERS
211 SIZE_T PeakVirtualSize
;
213 ULONG PageFaultCount
;
214 SIZE_T PeakWorkingSetSize
;
215 SIZE_T WorkingSetSize
;
216 SIZE_T QuotaPeakPagedPoolUsage
;
217 SIZE_T QuotaPagedPoolUsage
;
218 SIZE_T QuotaPeakNonPagedPoolUsage
;
219 SIZE_T QuotaNonPagedPoolUsage
;
220 SIZE_T PagefileUsage
;
221 SIZE_T PeakPagefileUsage
;
222 } VM_COUNTERS
, *PVM_COUNTERS
;
224 typedef struct _VM_COUNTERS_EX
226 SIZE_T PeakVirtualSize
;
228 ULONG PageFaultCount
;
229 SIZE_T PeakWorkingSetSize
;
230 SIZE_T WorkingSetSize
;
231 SIZE_T QuotaPeakPagedPoolUsage
;
232 SIZE_T QuotaPagedPoolUsage
;
233 SIZE_T QuotaPeakNonPagedPoolUsage
;
234 SIZE_T QuotaNonPagedPoolUsage
;
235 SIZE_T PagefileUsage
;
236 SIZE_T PeakPagefileUsage
;
238 } VM_COUNTERS_EX
, *PVM_COUNTERS_EX
;
242 // Sub-Information Types for PFN Identity
244 typedef struct _MEMORY_FRAME_INFORMATION
246 ULONGLONG UseDescription
:4;
247 ULONGLONG ListDescription
:3;
248 ULONGLONG Reserved0
:1;
250 ULONGLONG DontUse
:48;
251 ULONGLONG Priority
:3;
252 ULONGLONG Reserved
:4;
253 } MEMORY_FRAME_INFORMATION
, *PMEMORY_FRAME_INFORMATION
;
255 typedef struct _FILEOFFSET_INFORMATION
259 ULONGLONG Reserved
:7;
260 } FILEOFFSET_INFORMATION
, *PFILEOFFSET_INFORMATION
;
262 typedef struct _PAGEDIR_INFORMATION
265 ULONGLONG PageDirectoryBase
:48;
266 ULONGLONG Reserved
:7;
267 } PAGEDIR_INFORMATION
, *PPAGEDIR_INFORMATION
;
269 typedef struct _UNIQUE_PROCESS_INFORMATION
272 ULONGLONG UniqueProcessKey
:48;
273 ULONGLONG Reserved
:7;
274 } UNIQUE_PROCESS_INFORMATION
, *PUNIQUE_PROCESS_INFORMATION
;
277 // PFN Identity Data Structure
279 typedef struct _MMPFN_IDENTITY
283 MEMORY_FRAME_INFORMATION e1
;
284 FILEOFFSET_INFORMATION e2
;
285 PAGEDIR_INFORMATION e3
;
286 UNIQUE_PROCESS_INFORMATION e4
;
288 SIZE_T PageFrameIndex
;
297 PVOID UniqueFileObjectKey
;
298 PVOID ProtoPteAddress
;
299 PVOID VirtualAddress
;
301 } MMPFN_IDENTITY
, *PMMPFN_IDENTITY
;
304 // List of Working Sets
306 typedef struct _MEMORY_WORKING_SET_LIST
309 ULONG WorkingSetList
[1];
310 } MEMORY_WORKING_SET_LIST
, *PMEMORY_WORKING_SET_LIST
;
313 // Memory Information Structures for NtQueryVirtualMemory
317 UNICODE_STRING SectionFileName
;
318 WCHAR NameBuffer
[ANYSIZE_ARRAY
];
319 } MEMORY_SECTION_NAME
, *PMEMORY_SECTION_NAME
;
322 // Section Information Structures for NtQuerySection
324 typedef struct _SECTION_BASIC_INFORMATION
329 } SECTION_BASIC_INFORMATION
, *PSECTION_BASIC_INFORMATION
;
331 typedef struct _SECTION_IMAGE_INFORMATION
333 PVOID TransferAddress
;
335 SIZE_T MaximumStackSize
;
336 SIZE_T CommittedStackSize
;
342 USHORT SubSystemMinorVersion
;
343 USHORT SubSystemMajorVersion
;
345 ULONG SubSystemVersion
;
348 USHORT ImageCharacteristics
;
349 USHORT DllCharacteristics
;
351 BOOLEAN ImageContainsCode
;
352 #if (NTDDI_VERSION >= NTDDI_LONGHORN)
357 UCHAR ComPlusNativeReady
:1;
358 UCHAR ComPlusILOnly
:1;
359 UCHAR ImageDynamicallyRelocated
:1;
360 UCHAR ImageMappedFlat
:1;
370 #if (NTDDI_VERSION >= NTDDI_LONGHORN)
375 } SECTION_IMAGE_INFORMATION
, *PSECTION_IMAGE_INFORMATION
;
377 #ifndef NTOS_MODE_USER
380 // Section Extension Information
382 typedef struct _MMEXTEND_INFO
384 ULONGLONG CommittedSize
;
385 ULONG ReferenceCount
;
386 } MMEXTEND_INFO
, *PMMEXTEND_INFO
;
389 // Segment and Segment Flags
391 typedef struct _SEGMENT_FLAGS
393 ULONG TotalNumberOfPtes4132
:10;
394 ULONG ExtraSharedWowSubsections
:1;
397 } SEGMENT_FLAGS
, *PSEGMENT_FLAGS
;
399 typedef struct _SEGMENT
401 struct _CONTROL_AREA
*ControlArea
;
402 ULONG TotalNumberOfPtes
;
403 ULONG NonExtendedPtes
;
405 ULONGLONG SizeOfSegment
;
406 MMPTE SegmentPteTemplate
;
407 ULONG NumberOfCommittedPages
;
408 PMMEXTEND_INFO ExtendInfo
;
409 SEGMENT_FLAGS SegmentFlags
;
413 SIZE_T ImageCommitment
;
414 PEPROCESS CreatingProcess
;
418 PSECTION_IMAGE_INFORMATION ImageInformation
;
423 } SEGMENT
, *PSEGMENT
;
425 typedef struct _MAPPED_FILE_SEGMENT
427 struct _CONTROL_AREA
*ControlArea
;
428 ULONG TotalNumberOfPtes
;
429 ULONG NonExtendedPtes
;
431 UINT64 SizeOfSegment
;
432 MMPTE SegmentPteTemplate
;
433 SIZE_T NumberOfCommittedPages
;
434 PMMEXTEND_INFO ExtendInfo
;
435 SEGMENT_FLAGS SegmentFlags
;
437 struct _MSUBSECTION
*LastSubsectionHint
;
438 } MAPPED_FILE_SEGMENT
, *PMAPPED_FILE_SEGMENT
;
441 // Event Counter Structure
443 typedef struct _EVENT_COUNTER
445 SLIST_ENTRY ListEntry
;
448 } EVENT_COUNTER
, *PEVENT_COUNTER
;
453 typedef struct _MMSECTION_FLAGS
455 ULONG BeingDeleted
:1;
456 ULONG BeingCreated
:1;
458 ULONG NoModifiedWriting
:1;
465 ULONG PhysicalMemory
:1;
471 ULONG UserReference
:1;
472 ULONG GlobalMemory
:1;
473 ULONG DeleteOnClose
:1;
474 ULONG FilePointerNull
:1;
475 ULONG DebugSymbolsLoaded
:1;
476 ULONG SetMappedFileIoComplete
:1;
477 ULONG CollidedFlush
:1;
480 ULONG ImageMappedInSystemSpace
:1;
481 ULONG UserWritable
:1;
483 ULONG GlobalOnlyPerSession
:1;
485 ULONG WriteCombined
:1;
487 } MMSECTION_FLAGS
, *PMMSECTION_FLAGS
;
489 typedef struct _MMSUBSECTION_FLAGS
493 ULONG SubsectionStatic
:1;
494 ULONG GlobalMemory
:1;
497 ULONG StartingSector4132
:10;
498 ULONG SectorEndOffset
:12;
499 } MMSUBSECTION_FLAGS
, *PMMSUBSECTION_FLAGS
;
501 typedef struct _MMSUBSECTION_FLAGS2
503 ULONG SubsectionAccessed
:1;
504 ULONG SubsectionConverted
:1;
506 } MMSUBSECTION_FLAGS2
;
509 // Control Area Structures
511 typedef struct _CONTROL_AREA
514 LIST_ENTRY DereferenceList
;
515 ULONG NumberOfSectionReferences
;
516 ULONG NumberOfPfnReferences
;
517 ULONG NumberOfMappedViews
;
518 ULONG NumberOfSystemCacheViews
;
519 ULONG NumberOfUserReferences
;
523 MMSECTION_FLAGS Flags
;
525 PFILE_OBJECT FilePointer
;
526 PEVENT_COUNTER WaitingForDeletion
;
527 USHORT ModifiedWriteCount
;
528 USHORT FlushInProgressCount
;
529 ULONG WritableUserReferences
;
531 } CONTROL_AREA
, *PCONTROL_AREA
;
533 typedef struct _LARGE_CONTROL_AREA
536 LIST_ENTRY DereferenceList
;
537 ULONG NumberOfSectionReferences
;
538 ULONG NumberOfPfnReferences
;
539 ULONG NumberOfMappedViews
;
540 ULONG NumberOfSystemCacheViews
;
541 ULONG NumberOfUserReferences
;
545 MMSECTION_FLAGS Flags
;
547 PFILE_OBJECT FilePointer
;
548 PEVENT_COUNTER WaitingForDeletion
;
549 USHORT ModifiedWriteCount
;
550 USHORT FlushInProgressCount
;
551 ULONG WritableUserReferences
;
554 LIST_ENTRY UserGlobalList
;
556 } LARGE_CONTROL_AREA
, *PLARGE_CONTROL_AREA
;
559 // Subsection and Mapped Subsection
561 typedef struct _SUBSECTION
563 PCONTROL_AREA ControlArea
;
567 MMSUBSECTION_FLAGS SubsectionFlags
;
569 ULONG StartingSector
;
570 ULONG NumberOfFullSectors
;
571 PMMPTE SubsectionBase
;
573 ULONG PtesInSubsection
;
574 struct _SUBSECTION
*NextSubsection
;
575 } SUBSECTION
, *PSUBSECTION
;
577 typedef struct _MSUBSECTION
579 PCONTROL_AREA ControlArea
;
583 MMSUBSECTION_FLAGS SubsectionFlags
;
585 ULONG StartingSector
;
586 ULONG NumberOfFullSectors
;
587 PMMPTE SubsectionBase
;
589 ULONG PtesInSubsection
;
590 struct _SUBSECTION
*NextSubsection
;
591 LIST_ENTRY DereferenceList
;
592 ULONG_PTR NumberOfMappedViews
;
596 MMSUBSECTION_FLAGS2 SubsectionFlags2
;
598 } MSUBSECTION
, *PMSUBSECTION
;
603 typedef struct _SEGMENT_OBJECT
606 ULONG TotalNumberOfPtes
;
607 LARGE_INTEGER SizeOfSegment
;
608 ULONG NonExtendedPtes
;
609 ULONG ImageCommitment
;
610 PCONTROL_AREA ControlArea
;
611 PSUBSECTION Subsection
;
612 PLARGE_CONTROL_AREA LargeControlArea
;
613 PMMSECTION_FLAGS MmSectionFlags
;
614 PMMSUBSECTION_FLAGS MmSubSectionFlags
;
615 } SEGMENT_OBJECT
, *PSEGMENT_OBJECT
;
620 typedef struct _SECTION_OBJECT
627 PSEGMENT_OBJECT Segment
;
628 } SECTION_OBJECT
, *PSECTION_OBJECT
;
631 // Generic Address Range Structure
633 typedef struct _ADDRESS_RANGE
640 } ADDRESS_RANGE
, *PADDRESS_RANGE
;
643 // Node in Memory Manager's AVL Table
645 typedef struct _MMADDRESS_NODE
650 struct _MMADDRESS_NODE
*Parent
;
652 struct _MMADDRESS_NODE
*LeftChild
;
653 struct _MMADDRESS_NODE
*RightChild
;
654 ULONG_PTR StartingVpn
;
656 } MMADDRESS_NODE
, *PMMADDRESS_NODE
;
659 // Memory Manager AVL Table for VADs and other descriptors
661 typedef struct _MM_AVL_TABLE
663 MMADDRESS_NODE BalancedRoot
;
664 ULONG_PTR DepthOfTree
:5;
667 ULONG_PTR NumberGenericTableElements
:56;
669 ULONG_PTR NumberGenericTableElements
:24;
673 } MM_AVL_TABLE
, *PMM_AVL_TABLE
;
676 // Virtual Adress List used in VADs
678 typedef struct _MMADDRESS_LIST
682 } MMADDRESS_LIST
, *PMMADDRESS_LIST
;
685 // Flags used in the VAD
687 typedef struct _MMVAD_FLAGS
690 ULONG_PTR CommitCharge
:51;
692 ULONG_PTR CommitCharge
:19;
694 ULONG_PTR NoChange
:1;
696 ULONG_PTR MemCommit
:1;
697 ULONG_PTR Protection
:5;
699 ULONG_PTR PrivateMemory
:1;
700 } MMVAD_FLAGS
, *PMMVAD_FLAGS
;
703 // Extended flags used in the VAD
705 typedef struct _MMVAD_FLAGS2
710 ULONG MultipleSecured
:1;
713 ULONG ExtendableFile
:1;
716 } MMVAD_FLAGS2
, *PMMVAD_FLAGS2
;
719 // Virtual Address Descriptor (VAD) Structure
721 typedef struct _MMVAD
726 struct _MMVAD
*Parent
;
728 struct _MMVAD
*LeftChild
;
729 struct _MMVAD
*RightChild
;
730 ULONG_PTR StartingVpn
;
735 MMVAD_FLAGS VadFlags
;
737 PCONTROL_AREA ControlArea
;
738 PMMPTE FirstPrototypePte
;
739 PMMPTE LastContiguousPte
;
743 MMVAD_FLAGS2 VadFlags2
;
748 // Long VAD used in section and private allocations
750 typedef struct _MMVAD_LONG
759 ULONG_PTR StartingVpn
;
764 MMVAD_FLAGS VadFlags
;
766 PCONTROL_AREA ControlArea
;
767 PMMPTE FirstPrototypePte
;
768 PMMPTE LastContiguousPte
;
772 MMVAD_FLAGS2 VadFlags2
;
777 MMADDRESS_LIST Secured
;
782 PMMEXTEND_INFO ExtendedInfo
;
784 } MMVAD_LONG
, *PMMVAD_LONG
;
787 // Short VAD used in virtual memory allocations
789 typedef struct _MMVAD_SHORT
798 ULONG_PTR StartingVpn
;
803 MMVAD_FLAGS VadFlags
;
805 } MMVAD_SHORT
, *PMMVAD_SHORT
;
808 // Actual Section Object
810 typedef struct _SECTION
812 MMADDRESS_NODE Address
;
814 LARGE_INTEGER SizeOfSection
;
818 MMSECTION_FLAGS Flags
;
820 ULONG InitialPageProtection
;
821 } SECTION
, *PSECTION
;
824 // Memory Manager Working Set Structures
826 typedef struct _MMWSLENTRY
829 ULONG_PTR LockedInWs
:1;
830 ULONG_PTR LockedInMemory
:1;
831 ULONG_PTR Protection
:5;
835 ULONG_PTR VirtualPageNumber
: MM_PAGE_FRAME_NUMBER_SIZE
;
836 } MMWSLENTRY
, *PMMWSLENTRY
;
838 typedef struct _MMWSLE
842 PVOID VirtualAddress
;
848 typedef struct _MMWSLE_HASH
852 } MMWSLE_HASH
, *PMMWSLE_HASH
;
854 typedef struct _MMWSL
861 ULONG LastInitializedWsle
;
862 ULONG NonDirectCount
;
863 PMMWSLE_HASH HashTable
;
865 ULONG NumberOfCommittedPageTables
;
866 PVOID HashTableStart
;
867 PVOID HighestPermittedHashAddress
;
868 ULONG NumberOfImageWaiters
;
870 USHORT UsedPageTableEntries
[768];
871 ULONG CommittedPageTables
[24];
875 // Flags for Memory Support Structure
877 typedef struct _MMSUPPORT_FLAGS
879 ULONG SessionSpace
:1;
880 ULONG BeingTrimmed
:1;
881 ULONG SessionLeader
:1;
883 ULONG MaximumWorkingSetHard
:1;
885 ULONG MinimumWorkingSetHard
:1;
887 ULONG MemoryPriority
:8;
888 ULONG GrowWsleHash
:1;
889 ULONG AcquiredUnsafe
:1;
891 } MMSUPPORT_FLAGS
, *PMMSUPPORT_FLAGS
;
894 // Per-Process Memory Manager Data
896 typedef struct _MMSUPPORT
898 #if (NTDDI_VERSION >= NTDDI_WS03)
899 LIST_ENTRY WorkingSetExpansionLinks
;
901 #if (NTDDI_VERSION >= NTDDI_LONGHORN)
902 USHORT LastTrimpStamp
;
903 USHORT NextPageColor
;
905 LARGE_INTEGER LastTrimTime
;
907 MMSUPPORT_FLAGS Flags
;
908 ULONG PageFaultCount
;
909 ULONG PeakWorkingSetSize
;
910 #if (NTDDI_VERSION >= NTDDI_LONGHORN)
913 ULONG GrowthSinceLastEstimate
;
915 ULONG MinimumWorkingSetSize
;
916 ULONG MaximumWorkingSetSize
;
917 PMMWSL VmWorkingSetList
;
918 #if (NTDDI_VERSION < NTDDI_WS03)
919 LIST_ENTRY WorkingSetExpansionLinks
;
922 #if (NTDDI_VERSION >= NTDDI_LONGHORN)
924 ULONG WorkingSetPrivateSize
;
925 ULONG WorkingSetSizeOverhead
;
927 ULONG NextEstimationSlot
;
929 ULONG EstimatedAvailable
;
931 ULONG WorkingSetSize
;
932 #if (NTDDI_VERSION >= NTDDI_LONGHORN)
935 EX_PUSH_LOCK WorkingSetMutex
;
936 #if (NTDDI_VERSION >= NTDDI_LONGHORN)
939 } MMSUPPORT
, *PMMSUPPORT
;
942 // Memory Information Types
944 typedef struct _MEMORY_BASIC_INFORMATION
947 PVOID AllocationBase
;
948 ULONG AllocationProtect
;
953 } MEMORY_BASIC_INFORMATION
,*PMEMORY_BASIC_INFORMATION
;
956 // Driver Verifier Data
958 typedef struct _MM_DRIVER_VERIFIER_DATA
962 ULONG AcquireSpinLocks
;
963 ULONG SynchronizeExecutions
;
964 ULONG AllocationsAttempted
;
965 ULONG AllocationsSucceeded
;
966 ULONG AllocationsSucceededSpecialPool
;
967 ULONG AllocationsWithNoTag
;
970 ULONG AllocationsFailed
;
971 ULONG AllocationsFailedDeliberately
;
976 ULONG CurrentPagedPoolAllocations
;
977 ULONG CurrentNonPagedPoolAllocations
;
978 ULONG PeakPagedPoolAllocations
;
979 ULONG PeakNonPagedPoolAllocations
;
982 ULONG PeakPagedBytes
;
983 ULONG PeakNonPagedBytes
;
984 ULONG BurstAllocationsFailedDeliberately
;
987 } MM_DRIVER_VERIFIER_DATA
, *PMM_DRIVER_VERIFIER_DATA
;
990 // Internal Driver Verifier Table Data
992 typedef struct _DRIVER_SPECIFIED_VERIFIER_THUNKS
994 LIST_ENTRY ListEntry
;
995 struct _LDR_DATA_TABLE_ENTRY
*DataTableEntry
;
996 ULONG NumberOfThunks
;
997 } DRIVER_SPECIFIED_VERIFIER_THUNKS
, *PDRIVER_SPECIFIED_VERIFIER_THUNKS
;
1004 // Default heap size values. For user mode, these values are copied to a new
1005 // process's PEB by the kernel in MmCreatePeb. In kernel mode, RtlCreateHeap
1006 // reads these variables directly.
1008 // These variables should be considered "const"; they are written only once,
1009 // during MmInitSystem.
1011 extern SIZE_T MmHeapSegmentReserve
;
1012 extern SIZE_T MmHeapSegmentCommit
;
1013 extern SIZE_T MmHeapDeCommitTotalFreeThreshold
;
1014 extern SIZE_T MmHeapDeCommitFreeBlockThreshold
;
1017 // Section Object Type
1019 extern POBJECT_TYPE NTSYSAPI MmSectionObjectType
;
1025 #endif // !NTOS_MODE_USER
1031 #endif // _MMTYPES_H