typedef struct _MEMORY_BASIC_INFORMATION { /* mbi */
PVOID BaseAddress;
PVOID AllocationBase;
DWORD AllocationProtect;
DWORD RegionSize;
DWORD State;
DWORD Protect;
DWORD Type;
} MEMORY_BASIC_INFORMATION;
typedef MEMORY_BASIC_INFORMATION *PMEMORY_BASIC_INFORMATION;
The MEMORY_BASIC_INFORMATION data structure contains information about a virtual memory allocation.
BaseAddress
The base address of the region.
AllocationBase
The allocation base of the allocation this page is contained within.
AllocationProtect
The protection specified when the the region was initially allocated.
RegionSize
The size of the region in bytes beginning at the base address in which all pages have identical attributes.
State
The state of the pages within the region.
State | Meaning |
MEM_COMMIT | The state of the pages within the region is committed. |
MEM_FREE | The state of the pages within the region is free. |
MEM_RESERVE | The state of the pages within the region is reserved. |
If the memory state is MEM_FREE the information in the AllocationBase, AllocationProtect, Protect and Type fields in the structure are undefined.
If the memory state is MEM_RESERVE the information in the Protect field is undefined.
Protect
The protection of the pages within the region.
Value | Meaning |
PAGE_NOACCESS | No access to the region of pages is allowed. An attempt to read, write, or execute within the region results in an access violation (i.e., a GP fault). |
PAGE_READONLY | Read-access to the region of pages is allowed. An attempt to execute or write within the region results in an access violation. |
PAGE_READWRITE | Read and write access to the region of pages is allowed. |
Type
The type of pages within the region.
Value | Meaning |
MEM_PRIVATE | The pages within the region are private. Only application-private memory is supported. |
VirtualQuery