pub struct FastAlloc { /* private fields */ }
Implementations§
Source§impl FastAlloc
impl FastAlloc
Sourcepub unsafe fn new(param: FastAllocParam) -> Self
pub unsafe fn new(param: FastAllocParam) -> Self
§Safety
The base_addr..(base_addr + len)
must be allocated before using,
and must guarantee no others write to the memory range, otherwise behavior is undefined.
pub fn contains_ptr(&self, p: *mut u8) -> bool
pub fn malloc(&mut self, nbytes: usize) -> *mut u8
pub fn free(&mut self, p: *mut u8)
Auto Trait Implementations§
impl Freeze for FastAlloc
impl RefUnwindSafe for FastAlloc
impl !Send for FastAlloc
impl !Sync for FastAlloc
impl Unpin for FastAlloc
impl UnwindSafe for FastAlloc
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