#[repr(C)]pub struct DynPmm<'a, const RAM: bool> {
data: *const (),
allocate_raw_at: unsafe fn(_: *const (), at: RawFrame, count: NonZero<usize>) -> Result<RawFrame, AllocError>,
allocate_one_raw: unsafe fn(*const ()) -> Result<RawFrame, AllocError>,
allocate_raw: unsafe fn(_: *const (), count: NonZero<usize>) -> Result<RawFrame, AllocError>,
deallocate_raw: unsafe fn(_: *const (), base: RawFrame, count: NonZero<usize>),
_phantom: PhantomData<&'a ()>,
}Available on crate feature
full only.Fields§
§data: *const ()§allocate_raw_at: unsafe fn(_: *const (), at: RawFrame, count: NonZero<usize>) -> Result<RawFrame, AllocError>§allocate_one_raw: unsafe fn(*const ()) -> Result<RawFrame, AllocError>§allocate_raw: unsafe fn(_: *const (), count: NonZero<usize>) -> Result<RawFrame, AllocError>§deallocate_raw: unsafe fn(_: *const (), base: RawFrame, count: NonZero<usize>)§_phantom: PhantomData<&'a ()>Implementations§
Source§impl<'a, const RAM: bool> DynPmm<'a, RAM>
impl<'a, const RAM: bool> DynPmm<'a, RAM>
pub const fn into(self) -> DynPmm<'a, false>
Sourcepub fn allocate_one(&self) -> Result<Frames<RAM>, AllocError>where
Self: 'static,
pub fn allocate_one(&self) -> Result<Frames<RAM>, AllocError>where
Self: 'static,
Sourcepub fn allocate(&self, count: NonZero<usize>) -> Result<Frames<RAM>, AllocError>where
Self: 'static,
pub fn allocate(&self, count: NonZero<usize>) -> Result<Frames<RAM>, AllocError>where
Self: 'static,
Allocates a counts contiguous owned Frames
§Errors
Returns an AllocError if the memory could not be allocated. This
does not mean there is no free memory, just that is there no region
of contiguous memory large enough
pub fn allocate_at(
&self,
at: RawFrame,
count: NonZero<usize>,
) -> Result<Frames<RAM>, AllocError>where
Self: 'static,
Trait Implementations§
Source§impl<const RAM: bool> Pmm<RAM> for DynPmm<'_, RAM>
impl<const RAM: bool> Pmm<RAM> for DynPmm<'_, RAM>
Source§fn allocate_one_raw(&self) -> Result<RawFrame, AllocError>
fn allocate_one_raw(&self) -> Result<RawFrame, AllocError>
Allocates a single frame Read more
Source§fn allocate_raw(&self, count: NonZero<usize>) -> Result<RawFrame, AllocError>
fn allocate_raw(&self, count: NonZero<usize>) -> Result<RawFrame, AllocError>
Allocates
count number of contiguous frames Read morefn allocate_raw_at( &self, at: RawFrame, count: NonZero<usize>, ) -> Result<RawFrame, AllocError>
Source§unsafe fn deallocate_raw(&self, base: RawFrame, count: NonZero<usize>)
unsafe fn deallocate_raw(&self, base: RawFrame, count: NonZero<usize>)
impl<'a, const RAM: bool> Copy for DynPmm<'a, RAM>
impl<const RAM: bool> Send for DynPmm<'_, RAM>
impl<const RAM: bool> Sync for DynPmm<'_, RAM>
Auto Trait Implementations§
impl<'a, const RAM: bool> Freeze for DynPmm<'a, RAM>
impl<'a, const RAM: bool> RefUnwindSafe for DynPmm<'a, RAM>
impl<'a, const RAM: bool> Unpin for DynPmm<'a, RAM>
impl<'a, const RAM: bool> UnsafeUnpin for DynPmm<'a, RAM>
impl<'a, const RAM: bool> UnwindSafe for DynPmm<'a, RAM>
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)