Get the latest tech news

Parallel garbage collection for SBCL (2023)


We describe a parallel garbage collector which we are implementing for Steel Bank Common Lisp. The collector reclaims memory and allows  for bump allocation without the collector needing to move objects, using a mark-region heap based on Immix. The heap is comprised of pages, and pages are comprised of lines. We exploit the design of Immix in two ways: (i) generations are implemented without the collector moving objects or recording the generation in each object, by associating generations with lines; and (ii) conservative root finding is implemented by updating an object map only on demand, based on recording runs of contiguously allocated objects. The parallel garbage collector using one core usually is slower than the copying collector of SBCL, outperforms copying with two cores, and continues to scale with more cores.

We describe a parallel garbage collector which we are implementing for Steel Bank Common Lisp. The collector reclaims memory and allows for bump allocation without the collector needing to move objects, using a mark-region heap based on Immix. We exploit the design of Immix in two ways: (i) generations are implemented without the collector moving objects or recording the generation in each object, by associating generations with lines; and (ii) conservative root finding is implemented by updating an object map only on demand, based on recording runs of contiguously allocated objects.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of SBCL

SBCL