SystemInfo structv0.1.0

Source
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

NameTypeDescription
pageSizeuint32The size of a page, which is what memory protection is applied at.

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

Source

Parameters

NameTypeDescription
info*var SystemInforeceives the system information