Type Alias hwlocality::memory::binding::MemoryAllocationError

source ·
pub type MemoryAllocationError<OwnedSet> = MemoryBindingError<OwnedSet>;
Expand description

Errors that can occur when allocating memory

Aliased Type§

enum MemoryAllocationError<OwnedSet> {
    AllocationFailed,
    BadFlags(ParameterError<MemoryBindingFlags>),
    BadSet(MemoryBoundObject, OwnedSet),
    BadTarget,
    MixedResults,
    Unsupported,
    Unknown,
}

Variants§

§

AllocationFailed

Memory allocation failed even before trying to bind

This error may only be returned by Topology::allocate_bound_memory() and Topology::binding_allocate_memory().

§

BadFlags(ParameterError<MemoryBindingFlags>)

Requested memory binding flags are not valid in this context

Not all memory binding flag combinations make sense, either in isolation or in the context of a particular binding method. Please cross-check the documentation of MemoryBindingFlags and the method you were trying to call for more information.

§

BadSet(MemoryBoundObject, OwnedSet)

Cannot bind to the target CPU or node set

Operating systems can have various restrictions here, e.g. can only bind to NUMA node.

This error should only be reported when trying to set memory bindings.

This error might not be reported if MemoryBindingFlags::STRICT is not set. Instead, the implementation is allowed to try using a smaller or larger set to make the operation succeed.

§

BadTarget

Cannot get/set the memory binding of a zero-sized memory region

§

MixedResults

Memory policies and nodesets vary from one thread to another

This error is returned when querying a process’ memory bindings with the flags PROCESS and STRICT specified. It means that the default memory policies and nodesets are not homogeneous across all threads of the target process.

§

Unsupported

The system does not support the specified action or policy

For example, some systems only allow binding memory on a per-thread basis, whereas other systems only allow binding memory for all threads in a process.

This error might not be reported if MemoryBindingFlags::STRICT is not set. Instead, the implementation is allowed to try to use a slightly different operation (with side-effects, binding more objects, etc.) when the requested operation is not exactly supported.

§

Unknown

Available on Windows only.

An error occured, but we don’t know which one

This may only happen on Windows. On this operating system, there are multiple versions of the standard library (called the C Run-Times or CRTs), and it is very easy to end up in a situation where your program links against a different CRT than your hwloc build, which breaks errno-based error reporting among other things.