1978 called, wants its garbage collectors back
Posted Sep 4, 2008 16:17 UTC (Thu) by
BrucePerens (guest, #2510)
In reply to:
1978 called, wants its garbage collectors back by rwmj
Parent article:
The Kernel Hacker's Bookshelf: UNIX Internals
This is a matter for much religious argument, although in cases like the kernel it's probably not a significant use of time or resources. Reference counting can be bug-prone, if you aren't using a language like C++ where it can be entirely automated. It is deterministic, uses very small slices per iteration, and works well at interrupt level. Even with reference counting, GC may be necessary to take care of a circular reference.
I prefer a double-indirect system with reference counting and occasional GC, because it can resolve the fragmentation problem. CPUs could be built to optimize this similarly to the way they handle TLBs.
(
Log in to post comments)