pub fn set_limit(
max_memory: Option<usize>,
type_check: bool,
) -> Result<(), &'static str>Expand description
Applies a session’s soft memory limit and the hard ceiling above it. Call it after every request, since a session can also arrive (or end) through a restored dump or a reset; re-applying mid-session is a no-op.
On a 32-bit target (wasm) a limit near 4 GiB saturates the arithmetic and leaves the worker uncapped — there is no cap to express.