[−][src]Trait basic_allocator::allocators::HeapGrower
Associated Types
type Err
Required methods
unsafe fn grow_heap(
&mut self,
size: usize
) -> Result<(*mut u8, usize), Self::Err>
&mut self,
size: usize
) -> Result<(*mut u8, usize), Self::Err>
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.
Implementors
impl HeapGrower for SyscallHeapGrower
[src]
type Err = MmapError
unsafe fn grow_heap(
&mut self,
size: usize
) -> Result<(*mut u8, usize), MmapError>
[src]
&mut self,
size: usize
) -> Result<(*mut u8, usize), MmapError>