pub struct BlockAllocator {
pub data_bound: *mut u8,
pub data: *mut u8,
pub mmap: Mmap,
/* private fields */
}
Fields§
§data_bound: *mut u8
§data: *mut u8
§mmap: Mmap
Implementations§
Source§impl BlockAllocator
impl BlockAllocator
pub fn total_blocks(&self) -> usize
pub fn start(&self) -> *mut u8
pub fn end(&self) -> *mut u8
pub fn size(&self) -> usize
pub fn new(size: usize) -> BlockAllocator
pub fn is_in_space(&self, object: *const u8) -> bool
Sourcepub fn return_blocks(&mut self, blocks: impl Iterator<Item = *mut Block>)
pub fn return_blocks(&mut self, blocks: impl Iterator<Item = *mut Block>)
Return a collection of blocks.
pub fn return_block(&mut self, block: *mut Block)
Sourcepub fn available_blocks(&self) -> usize
pub fn available_blocks(&self) -> usize
Return the number of unallocated blocks.
Auto Trait Implementations§
impl !Freeze for BlockAllocator
impl RefUnwindSafe for BlockAllocator
impl !Send for BlockAllocator
impl !Sync for BlockAllocator
impl Unpin for BlockAllocator
impl UnwindSafe for BlockAllocator
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