pub struct Allocator<const N: usize> {
begin: PhysAddr,
bitalloc: BitAlloc<N>,
}Fields§
§begin: PhysAddr§bitalloc: BitAlloc<N>Implementations§
Trait Implementations§
Source§impl<const N: usize> Allocator<N> for Allocator<N>
impl<const N: usize> Allocator<N> for Allocator<N>
Source§fn initializer() -> unsafe fn(PhysAddr, usize) -> Result<Pin<Box<Self>>, Error>
fn initializer() -> unsafe fn(PhysAddr, usize) -> Result<Pin<Box<Self>>, Error>
Returns an initializer function that can be used to create an instance of the allocator.
The initializer function takes a physical address and the amount of pages needed. Read more
fn alloc(&mut self, page_count: usize) -> Option<PhysAddr>
fn free(&mut self, addr: PhysAddr, page_count: usize)
Auto Trait Implementations§
impl<const N: usize> Freeze for Allocator<N>
impl<const N: usize> RefUnwindSafe for Allocator<N>
impl<const N: usize> !Send for Allocator<N>
impl<const N: usize> !Sync for Allocator<N>
impl<const N: usize> Unpin for Allocator<N>
impl<const N: usize> UnwindSafe for Allocator<N>
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