Skip to main content

DEFAULT_GC_THRESHOLD

Constant DEFAULT_GC_THRESHOLD 

Source
pub const DEFAULT_GC_THRESHOLD: usize = _; // 67_108_864usize
Expand description

Default GC trigger threshold (64 MiB). QuickJS is reference-counted; the cycle GC otherwise fires adaptively at ~1.5x live size, so an object-churny automation script (big evaluate results, repeated ariaSnapshot/snapshot trees, locator chains) pays recurring mark-sweep stalls mid-run. Raising the floor lets a typical short-lived script finish with few/zero cycle-GC passes — the same lever Amazon LLRT exposes (LLRT_GC_THRESHOLD_MB, 20 MiB default). default_memory_limit (256 MiB) remains the hard backstop, and acyclic garbage is still freed immediately by refcounting, so this only defers cycle collection, not normal frees.