
Garbage collection
by Jones, Richard · first published 1996
10mentions
6recommended by
8HN commenters
2009–2023first – last mentioned
75% recommend25% neutral
Why HN recommends it
A thorough, approachable survey of automatic dynamic memory management algorithms. It is very readable and serves as a good starting point for anyone seeking depth on garbage collection.
Summarised by Claude from recommending comments
Affiliate links. As an Amazon Associate I earn from qualifying purchases.


"Garbage Collection: Algorithms for Automatic Dynamic Memory Management" by Richard Jones and Rafael D Lins. Very readable and approachable. I read the entire book, which I almost never do with technical books.
on “New Garbage Collector” ↗"Garbage Collection" by Richard Jones I'd recommend the Dragon Book, but it's a bit dated these days. Anything by Agner Fogg is good for optimization. There's always the D forum, where we're always going hammer and tong…
on “How I Came to Write D” ↗…Python's GC, a mark&sweep phase is usually added to reference counting so that if there's garbage which contains references to itself but has no external references, it will eventually be collected. (_Garbage Collection_ by Richard Jones and Rafael Lins is an excellent resource on GC details, btw. There's also a decent overview in the O'Reilly OCaml book (http://caml.inria.fr/pub/docs/oreilly-book/html/book-ora082....…
on “'We are no longer as optimistic about removing the GIL completely. '” ↗…disaster when used beyond their proper niches), etc. All are masters who've gotten their hands dirty, many are theory people as well. http://www.amazon.com/Coders-at-Work-Peter-Seibel/dp/1430219... Garbage Collection by Jones Lins: Pretty much the only book in the field (except for the forthcoming Advanced Garbage Collection sequel in the middle of this year), covers the territory as of the mid-90s. Much more fun…
on “Ask HN: Great programming books you read in 2009?” ↗There is a lot of data on this topic. This is a good starting place: http://www.amazon.com/Garbage-Collection-Algorithms-Automati...
on “Is reference counting slower than GC?” ↗…the end. Edit: yes, it's sometimes ok to leak). As somebody says elsewhere, it's multidimensional issue and a single dimensional garbage collector can't be a brilliant match for everything. The book "Garbage Collection" by Richard Jones, recently discussed on HN, is something I'd highly recommend you buy and read.
on “Z Garbage Collector: The Next Generation” ↗…full pass at a time) and/or generational (using several smaller generations, which are collected individually) break up GC pauses into something less disruptive. For a good overview, read "Uniprocessor Garbage Collection Techniques" by Paul Wilson (check google scholar). Richard Jones's _Garbage Collection: Algorithms for Automatic Dynamic Memory Management_ is more in depth.
on “Zed Shaw on C++” ↗Swift has a garbage collector. https://www.amazon.com/Garbage-Collection-Algorithms-Automat... Check chapter 5.
on “Modern garbage collection” ↗Actually C++ got a tracing GC API in C++11. As for the rest, RC is GC. Check chapter 5 in one of the most widely academic accepted books about GC algorithms. https://www.amazon.com/Garbage-Collection-Algorithms-Automat...
on “Modern garbage collection” ↗…years ago. I cannot think about anything more modern. It's a niche which used to be popular in FinTech circles mostly. As such valuable info was scattered across random blogs and the JVM spec itself. "Garbage Collection: Algorithms for Automatic Dynamic Memory Management" (https://www.amazon.com/Garbage-Collection-Algorithms-Automat...) seems to cover GC algorithms up to the CMS. "The Art of Multiprocessor Programming"…
on “Ask HN: Best Books on the JVM?” ↗