#ifndef _NTMMAPI_H
/**
* The MEMORY_REGION_INFORMATION_TYPE union decodes the region-type bitfield returned by MemoryRegionInformationEx.
*
* The union overlays the 32-bit RegionType member of MEMORY_REGION_INFORMATION
* and MEMORY_REGION_INFORMATION_EX with individual allocation-type and page-size
* indicators. A set bit describes the corresponding property of the allocation.
*/
typedef union _MEMORY_REGION_INFORMATION_TYPE
{
ULONG RegionType; // Combined 32-bit region-type flags returned by class 7.
struct
{
ULONG Private : 1; // Bit 0: Private allocation belonging to the process.
ULONG MappedDataFile : 1; // Bit 1: Mapped view of a data file.
ULONG MappedImage : 1; // Bit 2: Mapped view of an executable image.
ULONG MappedPageFile : 1; // Bit 3: Mapped view of a pagefile-backed section.
ULONG MappedPhysical : 1; // Bit 4: View of the physical-memory section.
ULONG DirectMapped : 1; // Bit 5: Mapped view of a direct-mapped file.
ULONG SoftwareEnclave : 1; // Bit 6: Software-enclave allocation. Since REDSTONE3.
ULONG PageSize64K : 1; // Bit 7: Uses 65536-byte pages.
ULONG PlaceholderReservation : 1; // Bit 8: Placeholder reservation. Since REDSTONE4.
ULONG MappedAwe : 1; // Bit 9: Address Windowing Extensions (AWE) allocation. Since 21H1.
ULONG MappedWriteWatch : 1; // Bit 10: Allocation uses write-watch tracking.
ULONG PageSizeLarge : 1; // Bit 11: Uses large pages (2097152 bytes on the verified x64 build).
ULONG PageSizeHuge : 1; // Bit 12: Uses huge pages (1073741824 bytes on the verified x64 build).
ULONG Reserved : 19; // Bits 13 through 31: Reserved; do not interpret.
} DUMMYSTRUCTNAME;
} MEMORY_REGION_INFORMATION_TYPE, *PMEMORY_REGION_INFORMATION_TYPE;
View code on GitHubNo description available.