pub struct NumaNode(/* private fields */);Expand description
A NUMA node number, as Windows numbers them.
A newtype rather than a bare u32 because the two u32s in this area mean
different things and are trivially swapped at a call site: a node number
and a count of nodes are both small integers, and
highest_numa_node returns the former while reading like the latter.
Node numbers are not an index. Windows does not promise they run
0..n, so a caller deriving a node from a position in some list is making
an assumption the platform never offered – see windows-placement-probe,
where a positional index reaching VirtualAllocExNuma was a real defect and
is called out at the site that fixed it.
Implementations§
Source§impl NumaNode
impl NumaNode
Sourcepub const fn new(node: u32) -> Self
pub const fn new(node: u32) -> Self
Wrap a raw node number.
Not validated against the machine: VirtualAllocExNuma is where an
impossible node is rejected, and validating here would mean a second,
weaker opinion about what exists. See NumaBuffer::new for what the
platform actually does with an out-of-range node, which is not what its
documentation says.