pub struct PoolingInstanceAllocatorConfig {
pub max_unused_warm_slots: u32,
pub stack_size: usize,
pub limits: InstanceLimits,
pub async_stack_zeroing: bool,
pub async_stack_keep_resident: usize,
pub linear_memory_keep_resident: usize,
pub table_keep_resident: usize,
}
Expand description
Configuration options for the pooling instance allocator supplied at construction.
Fields§
§max_unused_warm_slots: u32
See PoolingAllocatorConfig::max_unused_warm_slots
in wasmtime
stack_size: usize
The size, in bytes, of async stacks to allocate (not including the guard page).
limits: InstanceLimits
The limits to apply to instances allocated within this allocator.
async_stack_zeroing: bool
Whether or not async stacks are zeroed after use.
async_stack_keep_resident: usize
If async stack zeroing is enabled and the host platform is Linux this is
how much memory to zero out with memset
.
The rest of memory will be zeroed out with madvise
.
linear_memory_keep_resident: usize
How much linear memory, in bytes, to keep resident after resetting for
use with the next instance. This much memory will be memset
to zero
when a linear memory is deallocated.
Memory exceeding this amount in the wasm linear memory will be released
with madvise
back to the kernel.
Only applicable on Linux.
table_keep_resident: usize
Same as linear_memory_keep_resident
but for tables.
Trait Implementations§
source§impl Clone for PoolingInstanceAllocatorConfig
impl Clone for PoolingInstanceAllocatorConfig
source§fn clone(&self) -> PoolingInstanceAllocatorConfig
fn clone(&self) -> PoolingInstanceAllocatorConfig
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more