Skip to main content

Module limits

Module limits 

Source
Expand description

Per-store ResourceLimiter enforcing a single aggregate cap on GC heap, linear memory, and host-attached bytes (e.g. compiled regexes). host_attached_bytes is Arc<AtomicU64> so externref Drop impls can decrement it without a &mut TenantLimits borrow.

Structs§

ExecutionUsage
Usage survives successful execution, traps, and cleanup of host allocations.
MemoryCapExceeded
MemoryExhausted
The run reached its memory cap. Like spent fuel or an expired deadline this ends the run; a program cannot catch it. The refusal that raised it is the error’s source.
TenantLimits

Constants§

DEFAULT_MAX_STORE_BYTES

Functions§

install_tenant_limits
Call once, immediately after constructing the Store, before instantiating any module.
is_memory_exhausted
Whether err is the tenant’s cap refusing memory: the engine growing the GC heap, or the host charging bytes it holds for the program.