Back from holiday and working on chasm again, theres a new release rolling out now:
https://github.com/CharlieTap/chasm/tree/0.9.70. This release adds ways to configure chasms garbage collector, there are now three strategies configurable through chasms runtime config:
• Arena (Default)
This is the default mode of operation. In this mode, chasm will rewrite the bytecode of your Wasm functions to include a single
unconditional pause at the end of the function’s execution, removing all GC objects which are no longer referenced. It’s recommended
to use this mode unless you run into out of memory issues as the alternative (Traditional) requires costly heap checks.
• Manual
In this mode, chasm will perform no heap checks and will not pause for garbage collection. It’s expected the user monitors the heap size and manually triggers garbage collection using the GC public API.
• Traditional
This mode of operation functions like a traditional garbage collector. Chasm will rewrite the bytecode of your functions and insert heap
checks after every allocation. If the heap exceeds the threshold configurable in the
RuntimeConfig
, a pause will run, removing all dead
references.