Struct wasmtime::InstanceLimits[][src]

pub struct InstanceLimits {
    pub count: u32,
    pub memory_reservation_size: u64,
}

Represents the limits placed on instances by the pooling instance allocation strategy.

Fields

count: u32

The maximum number of concurrent instances supported (default is 1000).

memory_reservation_size: u64

The maximum size, in bytes, of host address space to reserve for each linear memory of an instance.

Note: this value has important performance ramifications.

On 64-bit platforms, the default for this value will be 6 GiB. A value of less than 4 GiB will force runtime bounds checking for memory accesses and thus will negatively impact performance. Any value above 4 GiB will start eliding bounds checks provided the offset of the memory access is less than (memory_reservation_size - 4 GiB). A value of 8 GiB will completely elide all bounds checks; consequently, 8 GiB will be the maximum supported value. The default of 6 GiB reserves less host address space for each instance, but a memory access with an offset above 2 GiB will incur runtime bounds checks.

On 32-bit platforms, the default for this value will be 10 MiB. A 32-bit host has very limited address space to reserve for a lot of concurrent instances. As a result, runtime bounds checking will be used for all memory accesses. For better runtime performance, a 64-bit host is recommended.

This value will be rounded up by the WebAssembly page size (64 KiB).

Trait Implementations

impl Clone for InstanceLimits[src]

impl Copy for InstanceLimits[src]

impl Debug for InstanceLimits[src]

impl Default for InstanceLimits[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pointable for T

type Init = T

The type for initializers.

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,