Struct switchboard_solana::program_id::entrypoint::BumpAllocator
pub struct BumpAllocator {
pub start: usize,
pub len: usize,
}
Expand description
The bump allocator used as the default rust heap when running programs.
Fields§
§start: usize
§len: usize
Trait Implementations§
§impl 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.
§unsafe fn alloc(&self, layout: Layout) -> *mut u8
unsafe fn alloc(&self, layout: Layout) -> *mut u8
Allocate memory as described by the given
layout
. Read moreAuto Trait Implementations§
impl Freeze for BumpAllocator
impl RefUnwindSafe for BumpAllocator
impl Send for BumpAllocator
impl Sync for BumpAllocator
impl Unpin for BumpAllocator
impl UnwindSafe for BumpAllocator
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more