SystemInfo structv0.1.0
What GetSystemInfo reports about the machine.
pub struct SystemInfo {
pub pageSize: uint32;
// private fields
}
The two granularities are not the same and the difference matters: pageSize is what protection is applied at,
while allocationGranularity is what a reservation's base address is rounded to, and on every Windows release it
is 64 KiB rather than a page. A reservation therefore wastes address space that a page-granular system would not.
Fields
| Name | Type | Description |
|---|---|---|
pageSize | uint32 | The size of a page, which is what memory protection is applied at. |
Related
GetSystemInfo
pub extern func GetSystemInfo(info: *var SystemInfo)
Reads what the system reports about the machine, including its page size. Cannot fail and reports nothing: the structure is always filled.
See also: https://learn.microsoft.com/en-us/windows/win32/api/sysinfoapi/nf-sysinfoapi-getsysteminfo
Parameters
| Name | Type | Description |
|---|---|---|
info | *var SystemInfo | receives the system information |