pub struct ManagedHeap { /* private fields */ }Expand description
A virtual Heap which can be garbage collected by calling gc().
Implementations§
Source§impl ManagedHeap
impl ManagedHeap
pub fn num_used_blocks(&self) -> usize
pub fn num_free_blocks(&self) -> usize
pub fn total_size(&self) -> usize
pub fn used_size(&self) -> usize
Source§impl ManagedHeap
impl ManagedHeap
Sourcepub fn alloc(&mut self, size: HalfWord) -> Option<Address>
pub fn alloc(&mut self, size: HalfWord) -> Option<Address>
Takes the blocksize as a number of usize values.
The size in bytes of the block is therefore size * mem::size_of::
Auto Trait Implementations§
impl Freeze for ManagedHeap
impl RefUnwindSafe for ManagedHeap
impl !Send for ManagedHeap
impl !Sync for ManagedHeap
impl Unpin for ManagedHeap
impl UnwindSafe for ManagedHeap
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