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
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
86#define MEM_WRITE_WATCH 0x200000
87#define MEM_PHYSICAL 0x400000
88#define MEM_ROTATE 0x800000
89#define MEM_IMAGE SEC_IMAGE
90#define MEM_DOS_LIM 0x40000000
95#define SEC_NO_CHANGE 0x400000
96#define SEC_FILE 0x800000
97#define SEC_IMAGE 0x1000000
98#define SEC_PROTECTED_IMAGE 0x2000000
99#define SEC_RESERVE 0x4000000
100#define SEC_COMMIT 0x8000000
101#define SEC_NOCACHE 0x10000000
102#define SEC_WRITECOMBINE 0x40000000
103#define SEC_LARGE_PAGES 0x80000000
107#define SEC_BASED 0x200000
360#if (NTDDI_VERSION >= NTDDI_LONGHORN)
378#if (NTDDI_VERSION >= NTDDI_LONGHORN)
385#ifndef NTOS_MODE_USER
843#define MMWSLE_PREVIOUS_FREE_MASK 0x7FFFFFFF
846#define MMWSLE_PREVIOUS_FREE_MASK 0x7FF
847#define MMWSLE_PREVIOUS_FREE_JUMP 0x800
889 VOID* HighestUserAddress;
890 ULONG MaximumUserPageTablePages;
891 ULONG MaximumUserPageDirectoryPages;
893 ULONG NumberOfCommittedPageDirectories;
894 ULONG* CommittedPageDirectories;
895 ULONG NumberOfCommittedPageDirectoryParents;
896 ULONGLONG CommittedPageDirectoryParents[1];
924#if (NTDDI_VERSION >= NTDDI_WS03)
927#if (NTDDI_VERSION >= NTDDI_LONGHORN)
936#if (NTDDI_VERSION >= NTDDI_LONGHORN)
939 ULONG GrowthSinceLastEstimate;
944#if (NTDDI_VERSION < NTDDI_WS03)
948#if (NTDDI_VERSION >= NTDDI_LONGHORN)
953 ULONG NextEstimationSlot;
955 ULONG EstimatedAvailable;
958#if (NTDDI_VERSION >= NTDDI_LONGHORN)
962#if (NTDDI_VERSION >= NTDDI_LONGHORN)
unsigned long long UINT64
#define NonPagedPoolCacheAligned
struct _VM_COUNTERS_ VM_COUNTERS
struct _VM_COUNTERS_ * PVM_COUNTERS
struct _VM_COUNTERS_EX * PVM_COUNTERS_EX
struct _VM_COUNTERS_EX VM_COUNTERS_EX
#define MM_PAGE_FRAME_NUMBER_SIZE
struct _SEGMENT_OBJECT * PSEGMENT_OBJECT
SIZE_T MmHeapSegmentReserve
struct _MMWSLENTRY MMWSLENTRY
struct _MEMORY_BASIC_INFORMATION * PMEMORY_BASIC_INFORMATION
_MEMORY_INFORMATION_CLASS
@ MemoryBasicVlmInformation
struct _FILEOFFSET_INFORMATION FILEOFFSET_INFORMATION
struct _SEGMENT_OBJECT SEGMENT_OBJECT
struct _DRIVER_SPECIFIED_VERIFIER_THUNKS DRIVER_SPECIFIED_VERIFIER_THUNKS
struct _SUBSECTION * PSUBSECTION
struct _MMADDRESS_NODE * PMMADDRESS_NODE
SIZE_T MmHeapDeCommitFreeBlockThreshold
struct _SECTION_IMAGE_INFORMATION SECTION_IMAGE_INFORMATION
struct _MM_DRIVER_VERIFIER_DATA * PMM_DRIVER_VERIFIER_DATA
struct _MMVAD_FLAGS2 * PMMVAD_FLAGS2
struct _SEGMENT * PSEGMENT
struct _MEMORY_WORKING_SET_LIST MEMORY_WORKING_SET_LIST
enum _SECTION_INFORMATION_CLASS SECTION_INFORMATION_CLASS
struct _SECTION_BASIC_INFORMATION SECTION_BASIC_INFORMATION
@ VadDevicePhysicalMemory
struct _LARGE_CONTROL_AREA LARGE_CONTROL_AREA
struct _MMPFN_IDENTITY * PMMPFN_IDENTITY
struct _MMWSLE_HASH * PMMWSLE_HASH
SIZE_T MmHeapDeCommitTotalFreeThreshold
struct _MMWSLENTRY * PMMWSLENTRY
struct _MMVAD_SHORT MMVAD_SHORT
struct _MMSECTION_FLAGS MMSECTION_FLAGS
enum _MEMORY_INFORMATION_CLASS MEMORY_INFORMATION_CLASS
struct _SECTION_BASIC_INFORMATION * PSECTION_BASIC_INFORMATION
struct _SUBSECTION SUBSECTION
struct _PAGEDIR_INFORMATION * PPAGEDIR_INFORMATION
struct _LARGE_CONTROL_AREA * PLARGE_CONTROL_AREA
struct _SECTION_IMAGE_INFORMATION * PSECTION_IMAGE_INFORMATION
struct _MAPPED_FILE_SEGMENT * PMAPPED_FILE_SEGMENT
struct _MAPPED_FILE_SEGMENT MAPPED_FILE_SEGMENT
struct MEMORY_SECTION_NAME * PMEMORY_SECTION_NAME
struct _MMVAD_FLAGS2 MMVAD_FLAGS2
struct _SEGMENT_FLAGS SEGMENT_FLAGS
struct _MMSUBSECTION_FLAGS MMSUBSECTION_FLAGS
struct _EVENT_COUNTER * PEVENT_COUNTER
struct _MEMORY_WORKING_SET_LIST * PMEMORY_WORKING_SET_LIST
struct _MEMORY_FRAME_INFORMATION MEMORY_FRAME_INFORMATION
enum _PP_NPAGED_LOOKASIDE_NUMBER PP_NPAGED_LOOKASIDE_NUMBER
struct _MM_DRIVER_VERIFIER_DATA MM_DRIVER_VERIFIER_DATA
struct _MMSUPPORT MMSUPPORT
struct _MSUBSECTION MSUBSECTION
struct _CONTROL_AREA * PCONTROL_AREA
struct _MMSUPPORT_FLAGS MMSUPPORT_FLAGS
struct _MMWSLE_FREE_ENTRY MMWSLE_FREE_ENTRY
struct _SEGMENT_FLAGS * PSEGMENT_FLAGS
struct _MMSUPPORT * PMMSUPPORT
struct _MMVAD_SHORT * PMMVAD_SHORT
struct _MEMORY_FRAME_INFORMATION * PMEMORY_FRAME_INFORMATION
struct _FILEOFFSET_INFORMATION * PFILEOFFSET_INFORMATION
struct _MMVAD_LONG MMVAD_LONG
POBJECT_TYPE NTSYSAPI MmSectionObjectType
struct _PAGEDIR_INFORMATION PAGEDIR_INFORMATION
struct _ADDRESS_RANGE ADDRESS_RANGE
struct _MMWSLE_HASH MMWSLE_HASH
enum _MI_VAD_TYPE * PMI_VAD_TYPE
struct _MM_AVL_TABLE MM_AVL_TABLE
struct _UNIQUE_PROCESS_INFORMATION UNIQUE_PROCESS_INFORMATION
struct _MSUBSECTION * PMSUBSECTION
struct _MMVAD_FLAGS MMVAD_FLAGS
struct _MMVAD_FLAGS * PMMVAD_FLAGS
struct _SECTION * PSECTION
struct _CONTROL_AREA CONTROL_AREA
struct _MMPFN_IDENTITY MMPFN_IDENTITY
struct _MMSUPPORT_FLAGS * PMMSUPPORT_FLAGS
struct _DRIVER_SPECIFIED_VERIFIER_THUNKS * PDRIVER_SPECIFIED_VERIFIER_THUNKS
struct _MMVAD_LONG * PMMVAD_LONG
struct _MM_AVL_TABLE * PMM_AVL_TABLE
struct _MEMORY_BASIC_INFORMATION MEMORY_BASIC_INFORMATION
struct _MMWSLE_FREE_ENTRY * PMMWSLE_FREE_ENTRY
SIZE_T MmHeapSegmentCommit
struct _MMEXTEND_INFO * PMMEXTEND_INFO
enum _MI_VAD_TYPE MI_VAD_TYPE
struct _MMSUBSECTION_FLAGS2 MMSUBSECTION_FLAGS2
struct _MMEXTEND_INFO MMEXTEND_INFO
_SECTION_INFORMATION_CLASS
@ SectionBasicInformation
@ SectionImageInformation
struct _MMADDRESS_NODE MMADDRESS_NODE
struct _UNIQUE_PROCESS_INFORMATION * PUNIQUE_PROCESS_INFORMATION
struct _MMADDRESS_LIST MMADDRESS_LIST
_PP_NPAGED_LOOKASIDE_NUMBER
@ LookasideCreateInfoList
@ LookasideCompletionList
@ LookasideNameBufferList
@ ModifiedNoWritePageList
struct _MMSUBSECTION_FLAGS * PMMSUBSECTION_FLAGS
struct _EVENT_COUNTER EVENT_COUNTER
struct _ADDRESS_RANGE * PADDRESS_RANGE
struct _MMADDRESS_LIST * PMMADDRESS_LIST
struct _MMSECTION_FLAGS * PMMSECTION_FLAGS
enum _SECTION_INHERIT SECTION_INHERIT
UNICODE_STRING SectionFileName
ULONG NumberOfSectionReferences
PEVENT_COUNTER WaitingForDeletion
ULONG NumberOfMappedViews
ULONG NumberOfUserReferences
ULONG WritableUserReferences
union _CONTROL_AREA::@2608 u
USHORT ModifiedWriteCount
USHORT FlushInProgressCount
ULONG NumberOfPfnReferences
LIST_ENTRY DereferenceList
ULONG NumberOfSystemCacheViews
struct _LDR_DATA_TABLE_ENTRY * DataTableEntry
union _LARGE_CONTROL_AREA::@2609 u
ULONG NumberOfSystemCacheViews
USHORT ModifiedWriteCount
ULONG WritableUserReferences
ULONG NumberOfUserReferences
PEVENT_COUNTER WaitingForDeletion
USHORT FlushInProgressCount
LIST_ENTRY DereferenceList
ULONG NumberOfSectionReferences
LIST_ENTRY UserGlobalList
ULONG NumberOfMappedViews
ULONG NumberOfPfnReferences
PMMEXTEND_INFO ExtendInfo
SIZE_T NumberOfCommittedPages
SEGMENT_FLAGS SegmentFlags
struct _CONTROL_AREA * ControlArea
struct _MSUBSECTION * LastSubsectionHint
struct _MMADDRESS_NODE * RightChild
union _MMADDRESS_NODE::@2613 u1
struct _MMADDRESS_NODE * Parent
struct _MMADDRESS_NODE * LeftChild
union _MMPFN_IDENTITY::@2596 u2
union _MMPFN_IDENTITY::@2595 u1
UNIQUE_PROCESS_INFORMATION e4
FILEOFFSET_INFORMATION e2
MEMORY_FRAME_INFORMATION e1
PVOID UniqueFileObjectKey
ULONG GlobalOnlyPerSession
ULONG ImageMappedInSystemSpace
ULONG SetMappedFileIoComplete
ULONG SubsectionConverted
ULONG MaximumWorkingSetHard
ULONG MinimumWorkingSetHard
EX_PUSH_LOCK WorkingSetMutex
ULONG WorkingSetPrivateSize
ULONG WorkingSetSizeOverhead
ULONG MinimumWorkingSetSize
ULONG MaximumWorkingSetSize
LIST_ENTRY WorkingSetExpansionLinks
union _MMVAD_LONG::@2618 u
union _MMVAD_LONG::@2620 u3
union _MMVAD_LONG::@2621 u4
union _MMVAD_LONG::@2619 u2
PMMEXTEND_INFO ExtendedInfo
PCONTROL_AREA ControlArea
union _MMVAD_LONG::@2617 u1
union _MMVAD_SHORT::@2622 u1
union _MMVAD_SHORT::@2623 u
struct _MMVAD * RightChild
struct _MMVAD * LeftChild
PCONTROL_AREA ControlArea
ULONG_PTR VirtualPageNumber
USHORT UsedPageTableEntries[768]
ULONG LastInitializedWsle
ULONG NumberOfCommittedPageTables
ULONG CommittedPageTables[24]
PVOID HighestPermittedHashAddress
ULONG NumberOfImageWaiters
ULONG_PTR NumberGenericTableElements
MMADDRESS_NODE BalancedRoot
ULONG CurrentPagedPoolAllocations
ULONG AllocationsFailedDeliberately
ULONG BurstAllocationsFailedDeliberately
ULONG AllocationsSucceeded
ULONG SynchronizeExecutions
ULONG AllocationsWithNoTag
ULONG PeakNonPagedPoolAllocations
ULONG PeakPagedPoolAllocations
ULONG AllocationsAttempted
ULONG AllocationsSucceededSpecialPool
ULONG CurrentNonPagedPoolAllocations
PCONTROL_AREA ControlArea
union _MSUBSECTION::@2612 u2
MMSUBSECTION_FLAGS2 SubsectionFlags2
LIST_ENTRY DereferenceList
ULONG NumberOfFullSectors
ULONG_PTR NumberOfMappedViews
struct _SUBSECTION * NextSubsection
union _MSUBSECTION::@2611 u
MMSUBSECTION_FLAGS SubsectionFlags
ULONGLONG PageDirectoryBase
ULONG InitialPageProtection
LARGE_INTEGER SizeOfSection
ULONG ExtraSharedWowSubsections
ULONG TotalNumberOfPtes4132
PCONTROL_AREA ControlArea
PMMSUBSECTION_FLAGS MmSubSectionFlags
PLARGE_CONTROL_AREA LargeControlArea
PMMSECTION_FLAGS MmSectionFlags
LARGE_INTEGER SizeOfSegment
PMMEXTEND_INFO ExtendInfo
struct _CONTROL_AREA * ControlArea
PEPROCESS CreatingProcess
SEGMENT_FLAGS SegmentFlags
PSECTION_IMAGE_INFORMATION ImageInformation
ULONG NumberOfCommittedPages
ULONG NumberOfFullSectors
union _SUBSECTION::@2610 u
MMSUBSECTION_FLAGS SubsectionFlags
PCONTROL_AREA ControlArea
struct _SUBSECTION * NextSubsection
SIZE_T QuotaNonPagedPoolUsage
SIZE_T PeakWorkingSetSize
SIZE_T QuotaPeakNonPagedPoolUsage
SIZE_T QuotaPeakPagedPoolUsage
SIZE_T QuotaPagedPoolUsage
SIZE_T PeakWorkingSetSize
SIZE_T QuotaPagedPoolUsage
SIZE_T QuotaPeakPagedPoolUsage
SIZE_T QuotaPeakNonPagedPoolUsage
SIZE_T QuotaNonPagedPoolUsage
#define SLIST_ENTRY(type)
_Reserved_ PVOID Reserved
@ NonPagedPoolBaseCacheAlignedMustS
@ NonPagedPoolCacheAlignedSession
@ NonPagedPoolBaseMustSucceed
@ NonPagedPoolCacheAlignedMustS
@ NonPagedPoolBaseCacheAligned
@ PagedPoolCacheAlignedSession
@ NonPagedPoolCacheAlignedMustSSession
@ NonPagedPoolMustSucceed
@ NonPagedPoolMustSucceedSession