[−][src]Struct lucet_runtime_internals::alloc::Alloc
The structure that manages the allocations backing an Instance.
Allocs are not to be created directly, but rather are created by Regions during instance
creation.
Fields
heap_accessible_size: usizeheap_inaccessible_size: usizeslot: Option<Slot>region: Arc<dyn RegionInternal>Methods
impl Alloc[src]
pub fn addr_in_guard_page(&self, addr: *const c_void) -> bool[src]
pub fn expand_heap(
&mut self,
expand_bytes: u32,
module: &dyn Module
) -> Result<u32, Error>[src]
&mut self,
expand_bytes: u32,
module: &dyn Module
) -> Result<u32, Error>
pub fn reset_heap(&mut self, module: &dyn Module) -> Result<(), Error>[src]
pub fn heap_len(&self) -> usize[src]
pub fn slot(&self) -> &Slot[src]
pub unsafe fn heap(&self) -> &[u8][src]
Return the heap as a byte slice.
pub unsafe fn heap_mut(&mut self) -> &mut [u8][src]
Return the heap as a mutable byte slice.
pub unsafe fn heap_u32(&self) -> &[u32][src]
Return the heap as a slice of 32-bit words.
pub unsafe fn heap_u32_mut(&self) -> &mut [u32][src]
Return the heap as a mutable slice of 32-bit words.
pub unsafe fn heap_u64(&self) -> &[u64][src]
Return the heap as a slice of 64-bit words.
pub unsafe fn heap_u64_mut(&mut self) -> &mut [u64][src]
Return the heap as a mutable slice of 64-bit words.
pub unsafe fn stack_mut(&mut self) -> &mut [u8][src]
Return the stack as a mutable byte slice.
Since the stack grows down, alloc.stack_mut()[0] is the top of the stack, and
alloc.stack_mut()[alloc.limits.stack_size - 1] is the last byte at the bottom of the
stack.
pub unsafe fn stack_u64_mut(&mut self) -> &mut [u64][src]
Return the stack as a mutable slice of 64-bit words.
Since the stack grows down, alloc.stack_mut()[0] is the top of the stack, and
alloc.stack_mut()[alloc.limits.stack_size - 1] is the last word at the bottom of the
stack.
pub unsafe fn globals(&self) -> &[GlobalValue][src]
Return the globals as a slice.
pub unsafe fn globals_mut(&mut self) -> &mut [GlobalValue][src]
Return the globals as a mutable slice.
pub unsafe fn sigstack_mut(&mut self) -> &mut [u8][src]
Return the sigstack as a mutable byte slice.
pub fn mem_in_heap<T>(&self, ptr: *const T, len: usize) -> bool[src]
Trait Implementations
Auto Trait Implementations
impl Send for Alloc
impl Sync for Alloc
impl Unpin for Alloc
impl !UnwindSafe for Alloc
impl !RefUnwindSafe for Alloc
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> From<T> for T[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Same<T> for T
type Output = T
Should always be Self