trait Allocator
@lang(allocator_trait)
trait Allocator { .. }Expand
Some struct that allocates memory.
Functions§
fn alloc(self: &Self, size: usize) -> &void§Expand
Allocates size amount of memory with 8-byte alignment.
fn free(self: &Self, ptr: &void)§Expand
Frees the allocation at ptr.
fn realloc(self: &Self, ptr: &void, size: usize) -> &void§Expand
Grows or shrinks the allocation at ptr to size bytes. Returns the new allocation.