BoehmGC: Garbage Collector for C and C++

  • Boehm-Demers-Weiser Conservative GC
  • BoehmGC
  • BDWGC

A garbage collector for C and C++
github: Boehm-Demers-Weiser Garbage Collector v7.5
gitub: Ivan Maidanski
IvMaiSoft by Ivan Maidanski

Garbage collection tuning
Investigation of Boehm’s GC as GCC GC
User: Laurynas Biveinis

Questions on boehm-gc, fragmentation, and low memory resources
Boehm gc in embedded scheme application
Denkwürdige Merkmale der Sprache C: dynamische Speicherreservierung einmal anders
TinyGC
Writing a Simple Garbage Collector in C
Garbage Collection in C Programs, LISP and Java programmers take garbage collection for granted. With the Boehm-Demers-Weiser library, you easily can use it in C and C++ projects, too.

Is there any embeddable lisp or scheme?
ECL – Common Lisp language (look at the GC part!)

Stack-based:
alloca(): Automatic Storage with Variable Size

No, that would not be possible. The fundamental design choice for the BDW
GC is that it is "conservative": it does not know exactly which registers
and local variables contain pointers, so if it were to decide to move heap
objects around, it would have no way to safely patch up all pointers to the
moved objects. (Some of the words that look like pointers to a moved object
might actually be non-pointer data).

In general a collector that moves objects demands either deep integration
with the compiler's code generator (such that every stack frame is marked
up with exact where-are-the-pointers information), or very tight discipline
in the source code of the client program such that moveable pointers are never
stored in local variables across points calls the collector might run. The
latter is probably compatible with programmer sanity only for generated code
and/or when implementing a virtual machine.

Leave a Reply

Your email address will not be published. Required fields are marked *