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 moresource§impl Default for PoolingInstanceAllocatorConfig
impl Default for PoolingInstanceAllocatorConfig
source§fn default() -> PoolingInstanceAllocatorConfig
fn default() -> PoolingInstanceAllocatorConfig
impl Copy for PoolingInstanceAllocatorConfig
Auto Trait Implementations§
impl Freeze for PoolingInstanceAllocatorConfig
impl RefUnwindSafe for PoolingInstanceAllocatorConfig
impl Send for PoolingInstanceAllocatorConfig
impl Sync for PoolingInstanceAllocatorConfig
impl Unpin for PoolingInstanceAllocatorConfig
impl UnwindSafe for PoolingInstanceAllocatorConfig
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)