- Boehm-Demers-Weiser Conservative GC
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
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.
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.