[][src]Trait basic_allocator::allocators::HeapGrower

pub trait HeapGrower {
    unsafe fn grow_heap(&mut self, size: usize) -> (*mut u8, usize);
}

Required methods

unsafe fn grow_heap(&mut self, size: usize) -> (*mut u8, usize)

Grow the heap by at least size. Returns a pointer and the size of the memory available at that pointer.

Safety

This is pretty much entirely unsafe.

For this to function properly with the other types in this module:

  • The return value may be (null, 0), indicating allocation failure.
  • The return value may be (ptr, new_size), where new_size >= size, and where the memory pointed to by ptr must be available and untracked by any other rust code, including the allocator itself.
Loading content...

Implementors

impl HeapGrower for SyscallHeapGrower[src]

impl HeapGrower for ToyHeap[src]

Loading content...