[ Home ]
SBCL Internals

The pages on this CLiki-driven site can be edited by anybody at any time. No warranty of any kind can therefore be made; any implied warranties of merchantability or fitness for a particular purpose are expressly disclaimed
[ Home ] [ Recent Changes ] [ About CLiki ] [ Text Formatting ]

GENCGC is the Generational Conservative GC? used by the x86 port.

TODO: why do we need conservatism on the x86? There is a partial explanation on the Number Stack page, of all places

Garbage collection and threading

GENCGC is thread-safe on an SBCL compiled to use Threading. More specifically, most allocation is parallelized, and GC itself stops all threads.

gencgc has allocation regions: allocation within a region (typically a couple of pages big) can be done very simply, by a pointer increment and test against the end-of-region marker. CMUCL and single-threaded SBCL code only use one region in the mutator, but for sb-thread we create a region for each thread. This means that we can have multiple threads allocating in parallel.

A thread in alloc/init (pseudo-atomic) is not allowed to have Lisp-level signal handling code run in it or GC to run. See the Threading for notes about thread/gc interaction

The garbage collector known as GENCGC is slightly misnamed as it is only conservative on x86 and x86-64 platforms (and presumably other similarly register poor architectures should they appear). On PPC, it is precise.


This page is linked from: Boxed Registers   Cyrus Harmon   Darwin   GC   GENCGC-ppc   GENCGC-ppc-porting-committee   number stack   Signal Handling   Stop and Copy GC   THREADING   Threading-ppc   x86  

CLiki pages can be edited by anyone at any time. Imagine a fearsomely comprehensive disclaimer of liability. Now fear, comprehensively