[−][src]Trait swim_mem::alloc::Heap
Allocator for large memory blocks.
Required methods
unsafe fn alloc(&self, layout: Layout) -> Result<Block<'a>, HeapError>
Allocates a new memory block sized and aligned to at least Layout
;
returns None
if the allocation fails.
unsafe fn dealloc(&self, block: Block<'a>) -> usize
Deallocates a memory block previously allocated by alloc
.
Returns the number of freed bytes.