Struct wasmtime_runtime::PoolingInstanceAllocator [−][src]
pub struct PoolingInstanceAllocator { /* fields omitted */ }
Expand description
Implements the pooling instance allocator.
This allocator internally maintains pools of instances, memories, tables, and stacks.
Note: the resource pools are manually dropped so that the fault handler terminates correctly.
Implementations
pub fn new(
strategy: PoolingAllocationStrategy,
module_limits: ModuleLimits,
instance_limits: InstanceLimits,
stack_size: usize,
tunables: &Tunables
) -> Result<Self>
pub fn new(
strategy: PoolingAllocationStrategy,
module_limits: ModuleLimits,
instance_limits: InstanceLimits,
stack_size: usize,
tunables: &Tunables
) -> Result<Self>
Creates a new pooling instance allocator with the given strategy and limits.
Trait Implementations
Validates that a module is supported by the allocator.
Adjusts the tunables prior to creation of any JIT compiler. Read more
unsafe fn allocate(
&self,
req: InstanceAllocationRequest<'_>
) -> Result<InstanceHandle, InstantiationError>
unsafe fn allocate(
&self,
req: InstanceAllocationRequest<'_>
) -> Result<InstanceHandle, InstantiationError>
Allocates an instance for the given allocation request. Read more
unsafe fn initialize(
&self,
handle: &mut InstanceHandle,
module: &Module,
is_bulk_memory: bool
) -> Result<(), InstantiationError>
unsafe fn initialize(
&self,
handle: &mut InstanceHandle,
module: &Module,
is_bulk_memory: bool
) -> Result<(), InstantiationError>
Finishes the instantiation process started by an instance allocator. Read more
Deallocates a previously allocated instance. Read more
Allocates a fiber stack for calling async functions on.
Deallocates a fiber stack that was previously allocated with allocate_fiber_stack
. Read more