Expand description
Storage for the assertion + each-bucket regions.
By default the regions are heap-allocated by init — portable everywhere
(wasm, macOS, Linux), single process, no sharing. An exploration backend that
needs cross-fork sharing calls install_region with MAP_SHARED pointers
it owns; this crate then accounts into that memory and clears its view when
the backend frees it.
Pointers are thread-locals set before forking, so forked children inherit them
(the MAP_SHARED region is the same physical memory in parent and child).
Functions§
- assertion_
table_ ptr - Get the raw pointer to the assertion table region (null if uninitialized).
- clear
- Drop this crate’s view of the regions. Frees heap regions it owns; for installed (external) regions it only nulls the pointers — the backend frees its own memory.
- each_
bucket_ ptr - Get the raw pointer to the each-bucket region (null if uninitialized).
- init
- Allocate the regions on the heap (zeroed). Idempotent: a no-op if a region is already present (whether heap-owned or installed by a backend).
- install_
region - Point accounting at caller-owned regions (e.g.
MAP_SHAREDmemory from an exploration backend). The caller owns the memory and is responsible for freeing it after callingclear. Frees any heap regions this crate previously allocated. - prepare_
next_ seed_ reset - Reset only the per-seed split triggers, preserving pass/fail counts and watermarks/frontiers across seeds (coverage-preserving multi-seed reset).
- reset
- Zero both regions for a between-run reset. No-op if not initialized.