Enum hwlocality::memory::binding::MemoryBindingError
source · pub enum MemoryBindingError<OwnedSet: OwnedSpecializedBitmap> {
AllocationFailed,
BadFlags(FlagsError<MemoryBindingFlags>),
BadSet(MemoryBoundObject, OwnedSet),
BadTarget,
MixedResults,
Unsupported,
}
Expand description
Errors that can occur when binding memory to NUMA nodes, querying bindings, or allocating (possibly bound) memory
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(FlagsError<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.
Trait Implementations§
source§impl<OwnedSet: Clone + OwnedSpecializedBitmap> Clone for MemoryBindingError<OwnedSet>
impl<OwnedSet: Clone + OwnedSpecializedBitmap> Clone for MemoryBindingError<OwnedSet>
source§fn clone(&self) -> MemoryBindingError<OwnedSet>
fn clone(&self) -> MemoryBindingError<OwnedSet>
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl<OwnedSet: Debug + OwnedSpecializedBitmap> Debug for MemoryBindingError<OwnedSet>
impl<OwnedSet: Debug + OwnedSpecializedBitmap> Debug for MemoryBindingError<OwnedSet>
source§impl<OwnedSet> Display for MemoryBindingError<OwnedSet>where
OwnedSet: Display + OwnedSpecializedBitmap,
impl<OwnedSet> Display for MemoryBindingError<OwnedSet>where
OwnedSet: Display + OwnedSpecializedBitmap,
source§impl<OwnedSet: OwnedSpecializedBitmap> Error for MemoryBindingError<OwnedSet>
impl<OwnedSet: OwnedSpecializedBitmap> Error for MemoryBindingError<OwnedSet>
source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
source§impl<OwnedSet: OwnedSpecializedBitmap> From<MemoryBindingFlags> for MemoryBindingError<OwnedSet>
impl<OwnedSet: OwnedSpecializedBitmap> From<MemoryBindingFlags> for MemoryBindingError<OwnedSet>
source§fn from(value: MemoryBindingFlags) -> Self
fn from(value: MemoryBindingFlags) -> Self
source§impl<OwnedSet: Hash + OwnedSpecializedBitmap> Hash for MemoryBindingError<OwnedSet>
impl<OwnedSet: Hash + OwnedSpecializedBitmap> Hash for MemoryBindingError<OwnedSet>
source§impl<OwnedSet: PartialEq + OwnedSpecializedBitmap> PartialEq for MemoryBindingError<OwnedSet>
impl<OwnedSet: PartialEq + OwnedSpecializedBitmap> PartialEq for MemoryBindingError<OwnedSet>
source§fn eq(&self, other: &MemoryBindingError<OwnedSet>) -> bool
fn eq(&self, other: &MemoryBindingError<OwnedSet>) -> bool
self
and other
values to be equal, and is used
by ==
.