[−][src]Struct lucet_runtime_internals::alloc::Slot
A set of pointers into virtual memory that can be allocated into an Alloc
.
The 'r
lifetime parameter represents the lifetime of the region that backs this virtual
address space.
The memory layout in a Slot
is meant to be reused in order to reduce overhead on region
implementations. To back the layout with real memory, use Region::allocate_runtime
.
To ensure a Slot
can only be backed by one allocation at a time, it contains a mutex, but
otherwise can be freely copied.
Fields
start: *mut c_void
The beginning of the contiguous virtual memory chunk managed by this Alloc
.
The first part of this memory, pointed to by start
, is always backed by real memory, and
is used to store the lucet_instance structure.
heap: *mut c_void
The next part of memory contains the heap and its guard pages.
The heap is backed by real memory according to the HeapSpec
. Guard pages trigger a sigsegv
when accessed.
stack: *mut c_void
The stack comes after the heap.
Because the stack grows downwards, we get the added safety of ensuring that stack overflows
go into the guard pages, if the Limits
specify guard pages. The stack is always the size
given by Limits.stack_pages
.
globals: *mut c_void
The WebAssembly Globals follow the stack and a single guard page.
sigstack: *mut c_void
The signal handler stack follows the globals.
Having a separate signal handler stack allows the signal handler to run in situations where the normal stack has grown into the guard page.
limits: Limits
Limits of the memory.
Should not change through the lifetime of the Alloc
.
region: Weak<dyn RegionInternal>
Methods
impl Slot
[src]
Trait Implementations
Auto Trait Implementations
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