pub struct BitmapModel { /* private fields */ }Expand description
Bitmap allocator model for small allocation verification
Implementations§
Source§impl BitmapModel
impl BitmapModel
Sourcepub fn new(base: u64, frame_count: usize) -> Self
pub fn new(base: u64, frame_count: usize) -> Self
Create a new bitmap for the given number of frames
Sourcepub fn free(&mut self, addr: u64) -> Result<(), AllocModelError>
pub fn free(&mut self, addr: u64) -> Result<(), AllocModelError>
Free a frame
Sourcepub fn is_allocated(&self, addr: u64) -> bool
pub fn is_allocated(&self, addr: u64) -> bool
Check if a frame is allocated
Trait Implementations§
Source§impl Clone for BitmapModel
impl Clone for BitmapModel
Source§fn clone(&self) -> BitmapModel
fn clone(&self) -> BitmapModel
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for BitmapModel
impl RefUnwindSafe for BitmapModel
impl Send for BitmapModel
impl Sync for BitmapModel
impl Unpin for BitmapModel
impl UnwindSafe for BitmapModel
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)