pub enum BuddyError {
DoubleFree,
DataCorrupted,
NotFound,
AlignmentMismatch,
}Expand description
Errors that can occur during buddy allocator operations.
These errors help ensure memory safety, catch double-free bugs, and detect structural corruptions inside the allocator state.
Variants§
DoubleFree
Discovered an attempt to free a block that is already marked as free or linked.
DataCorrupted
The metadata for the requested block index is either missing, altered out of bounds, or structurally corrupted.
NotFound
No free blocks are available at the requested target order, and higher orders cannot be split further.
AlignmentMismatch
The provided block address is not aligned properly with respect to its allocation or buddy order.
Trait Implementations§
Source§impl Clone for BuddyError
impl Clone for BuddyError
impl Copy for BuddyError
Source§impl Debug for BuddyError
impl Debug for BuddyError
Source§impl Display for BuddyError
impl Display for BuddyError
impl Eq for BuddyError
Source§impl Error for BuddyError
impl Error for BuddyError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl PartialEq for BuddyError
impl PartialEq for BuddyError
impl StructuralPartialEq for BuddyError
Auto Trait Implementations§
impl Freeze for BuddyError
impl RefUnwindSafe for BuddyError
impl Send for BuddyError
impl Sync for BuddyError
impl Unpin for BuddyError
impl UnsafeUnpin for BuddyError
impl UnwindSafe for BuddyError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more