Parallel garbage collection for SBCL

submited by
Style Pass
2024-05-12 20:30:05

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.

Leave a Comment