On Sun, 11 Dec 2011 10:43:14 -0500, Dejan Lekic <[email protected]> wrote:
It would be really great to implement a generational GC similar
to the C4 mentioned in this presentation:
http://www.infoq.com/presentations/Understanding-Java-Garbage-Collection
. There is a research-paper about C4 as well:
http://dl.acm.org/citation.cfm?id=1993491 .
C4 is really an impressive GC operating system/runtime for JAVA. But, like many
advance GCs it is really impressive because of the restrictions of the JVM
memory model. First, most of the really awesome features of C4 (like scaling to
50GB of ram with 10 msec pauses) are entirely due to that fact that C4 is an
operating system. C4 works through a bunch of memory interrupts that are not
available to user-mode code on Windows, Linux, OSX, etc. Impressive work I'd
like to see integrated into said OSes, but that's unlikely to happen soon.
Second, being a systems language means that D can not implement a lot of GC
algorithms including copying, generational and the good concurrent collectors.
In D we are really limited in terms of GC strategies; for example, the
concurrent D garbage collector (CDGC) leverages *nix specific OS features to
work, and the general concurrency strategy it uses is IIRC slower than the JAVA
concurrent collectors. D can also go with thread-local GCs, which!
are
very competitive, but would introduce regions to D's memory model.
Also, the presence of D's structs and use stack allocation greatly increases
the average lifetime of objects in general and decreases the need for
generational collectors.