Search code examples
garbage-collectionreal-timevirtual-machinesqueak

Can Squeak VM support realtime GC?


For soft-realtime applications, GC should avoid burst operation by full mark-and-sweep. Some kind of incremental/concurrent/realtime approach required. Does Squeak VM support it currently?


Solution

  • Yes, Squeak has an incremental GC. It's been used for real-time sound synthesis even more than 10 years ago.

    The full GC kicks in only when the free space gets low and the incremental GC cannot reclaim it. That happens when objects get tenured frequently. Depending on your app the default GC parameters might need tweaking. See e.g. the setGCParameters method.