pub struct BuddyAllocator { /* private fields */ }Implementations§
Source§impl BuddyAllocator
impl BuddyAllocator
Sourcepub fn init(&mut self, memory_regions: &[MemoryRegion])
pub fn init(&mut self, memory_regions: &[MemoryRegion])
Performs the init operation.
Source§impl BuddyAllocator
impl BuddyAllocator
Sourcepub fn alloc_zone(
&mut self,
order: u8,
zone: ZoneType,
token: &IrqDisabledToken,
) -> Result<PhysFrame, AllocError>
pub fn alloc_zone( &mut self, order: u8, zone: ZoneType, token: &IrqDisabledToken, ) -> Result<PhysFrame, AllocError>
Allocate explicitly from one zone (e.g. DMA-only callers).
Trait Implementations§
Source§impl FrameAllocator for BuddyAllocator
impl FrameAllocator for BuddyAllocator
Source§fn alloc(
&mut self,
order: u8,
token: &IrqDisabledToken,
) -> Result<PhysFrame, AllocError>
fn alloc( &mut self, order: u8, token: &IrqDisabledToken, ) -> Result<PhysFrame, AllocError>
Performs the alloc operation.
Source§fn free(&mut self, frame: PhysFrame, order: u8, token: &IrqDisabledToken)
fn free(&mut self, frame: PhysFrame, order: u8, token: &IrqDisabledToken)
Performs the free operation.
Source§fn alloc_frame(
&mut self,
token: &IrqDisabledToken,
) -> Result<PhysFrame, AllocError>
fn alloc_frame( &mut self, token: &IrqDisabledToken, ) -> Result<PhysFrame, AllocError>
Allocate a single frame (convenience method)
Auto Trait Implementations§
impl Freeze for BuddyAllocator
impl RefUnwindSafe for BuddyAllocator
impl Send for BuddyAllocator
impl !Sync for BuddyAllocator
impl Unpin for BuddyAllocator
impl UnsafeUnpin for BuddyAllocator
impl UnwindSafe for BuddyAllocator
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more