[][src]Trait lucet_runtime_internals::region::RegionInternal

pub trait RegionInternal: Send + Sync {
    fn new_instance_with(
        &self,
        module: Arc<dyn Module>,
        embed_ctx: CtxMap
    ) -> Result<InstanceHandle, Error>;
fn drop_alloc(&self, alloc: &mut Alloc);
fn expand_heap(
        &self,
        slot: &Slot,
        start: u32,
        len: u32
    ) -> Result<(), Error>;
fn reset_heap(
        &self,
        alloc: &mut Alloc,
        module: &dyn Module
    ) -> Result<(), Error>;
fn as_dyn_internal(&self) -> &dyn RegionInternal; }

A RegionInternal is a collection of Slots which are managed as a whole.

Required methods

fn new_instance_with(
    &self,
    module: Arc<dyn Module>,
    embed_ctx: CtxMap
) -> Result<InstanceHandle, Error>

fn drop_alloc(&self, alloc: &mut Alloc)

Unmaps the heap, stack, and globals of an Alloc, while retaining the virtual address ranges in its Slot.

fn expand_heap(&self, slot: &Slot, start: u32, len: u32) -> Result<(), Error>

Expand the heap for the given slot to include the given range.

fn reset_heap(
    &self,
    alloc: &mut Alloc,
    module: &dyn Module
) -> Result<(), Error>

fn as_dyn_internal(&self) -> &dyn RegionInternal

Loading content...

Implementors

impl RegionInternal for MmapRegion[src]

Loading content...