Struct solana_sdk::entrypoint::BumpAllocator
source · [−]Expand description
The bump allocator used as the default rust heap when running programs.
Fields
start: usize
len: usize
Trait Implementations
sourceimpl GlobalAlloc for BumpAllocator
impl GlobalAlloc for BumpAllocator
Integer arithmetic in this global allocator implementation is safe when
operating on the prescribed HEAP_START_ADDRESS
and HEAP_LENGTH
. Any
other use may overflow and is thus unsupported and at one’s own risk.
sourceunsafe fn alloc(&self, layout: Layout) -> *mut u8
unsafe fn alloc(&self, layout: Layout) -> *mut u8
Allocate memory as described by the given layout
. Read more
sourceunsafe fn dealloc(&self, *mut u8, Layout)
unsafe fn dealloc(&self, *mut u8, Layout)
Deallocate the block of memory at the given ptr
pointer with the given layout
. Read more
Auto Trait Implementations
impl RefUnwindSafe for BumpAllocator
impl Send for BumpAllocator
impl Sync for BumpAllocator
impl Unpin for BumpAllocator
impl UnwindSafe for BumpAllocator
Blanket Implementations
sourceimpl<T> AbiExample for T
impl<T> AbiExample for T
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more