Struct wasmtime::InstanceLimits[][src]

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

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

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

Performs the conversion.

Performs the conversion.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

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.