The primordial thread may not have an opportunity to sweep
heap pages which have been merged from terminated threads.
So sweep any unswept pages during the cooperation phase.
Partial work towards addressing issue #534.
The context ensures that parametrised objects, continuations
and exception handlers can still be traced but are no longer
root objects (after thread terminations) and can be GCd eventually.
Partial work towards addressing issue #534.
Moving the code from gc_merge_all_heaps to gc_heap_merge removes
special handling of the start of the list and is (hopefully)
easier to read.
Partial work towards addressing issue #534.
When a thread exits, the heap is merged into the main thread.
Before doing so, free any unused parts of the heap to reduce
memory usage. Attempts to partially address issue #534.
This requires adding a "forced" stage for the collector,
which is the initial stage for a forced collection.
Thereafter, the collector continues to the usual stages
of collection.
GCC 14 has enabled various warnings as errors by default, e.g.
-Wimplicit-function-declaration. This causes the current feature
detection code for `open_memstream(3)` and `fmemopen(3)` to fail
with GCC 14.
This commit restores compatibility with GCC 14 in this regard.
Note that it may also be beneficial to pass a feature test macro
such as -D_POSIX_C_SOURCE. See the feature test macro requirements
for open_memstream(3)` and `fmemopen(3)`.
* WIP - C unit testing stubs
* Get test-lib to compile and run
* Add test-lib to CI
* Use cflags for test-lib
* Build runtime library
* Fix typo
* Break into separate CI tasks
* Cleanup
* Add example tests for non-CPS
* Include -g option for test-lib
* Add CI to build C runtime
Can expand into scheme at some point, this is a first step.
* Use latest upload workflow
Perform full scanning of function application list to ensure self-recursive calls are found. This prevents infinite loops in the beta expansion code when compiling simple recursive calls.