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§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.