Linux and GC
Tue, 28 Apr 1998 18:17:27 -0400 (EDT)
One particularly interesting garbage-collection method involves copying
the entire VM of a process, scanning it for garbage while the program
continues to run, then communicating back to the process what objects
were discovered to be garbage, so they can be freed.
In Linux (or Unix in general), you can copy the entire VM of a process
by calling fork(). In Linux, this is fast, because the memory doesn't
actually get copied until it's written to. In other Unices, it is
often not so fast, especially for processes with a lot of data.
This is a way of doing incremental GC that seems to avoid most of the
hairy problems incremental GC usually has. The parent and child need
only share some small communication window though which they can talk
about garbage; when the child finishes, it can exit.
What are some disadvantages of this method?