SYSTEM_NUMA_INFORMATION

The SYSTEM_NUMA_INFORMATION structure is what a successful call to ZwQuerySystemInformation or NtQuerySystemInformation produces in its output buffer when given the information classes SystemNumaProcessorMap (0x37) and SystemNumaAvailableMemory (0x3C).

Availability

The applicable information classes have non-trivial implementations in version 5.1 and higher.

Documentation Status

The SYSTEM_NUMA_INFORMATION structure is not documented.

Layout

The SYSTEM_NUMA_INFORMATION is 0x0108 or 0x0408 bytes in 32-bit and 64-bit Windows, respectively.

Offset Definition
0x00
ULONG HighestNodeNumber;
0x04
ULONG Reserved;
0x08
union {
    GROUP_AFFINITY ActiveProcessorsGroupAffinity [MAXIMUM_NODE_COUNT];
    ULONGLONG AvailableMemory [MAXIMUM_NODE_COUNT];
    ULONGLONG Pad [MAXIMUM_NODE_COUNT * 2];
};

in which MAXIMUM_NODE_COUNT is invented for this immediate documentational purpose and stands for 0x10 or 0x40 in 32-bit and 64-bit Windows, respectively.

Usage

The structure and information classes support documented Windows API functions:

Windows API Function Structure Usage
GetNumaAvailableMemoryNodeEx uses SystemNumaAvailableMemory to extract from AvailableMemory for given node
GetNumaHighestNodeNumber uses SystemNumaProcessorMap to get HighestNodeNumber
GetNumaNodeProcessorMaskEx uses SystemNumaProcessorMap to extract from ActiveProcessorsGroupAffinity for given node
GetNumaProcessorNodeEx uses SystemNumaProcessorMap to scan the ActiveProcessorsGroupAffinity for given Group and Number

User-mode programs would better use these in preference to NtQuerySystemInformation even though they are more cumbersome and less efficient (and even though Microsoft documents them or their antecedents as requiring at least Windows XP SP2, and originally documented them as requiring Windows Server 2003).