Modern software places increasing reliance on dynamic memory allocation, but its direct management is not only notoriously error-prone. Garbage collection eliminates many of these bugs. This reference presents each of the most important algorithms in detail, often with illustrations of its characteristic features and animations of its use.
The memory storage requirements of complex programs are extremely difficult to manage correctly by hand. A single error may lead to indeterminate and inexplicable program crashes. Worse still, failures are often unrepeatable and may surface only long after the program has been delivered to the customer. The eradication of memory errors typically consumes a substantial amount of development time. And yet the answer is relatively easy - garbage collection; removing the clutter of memory management from module interfaces, which then frees the programmer to concentrate on the problem at hand rather than low-level book-keeping details. For this reason, most modern object-oriented languages such as Smalltalk, Eiffel, Java and Dylan, are supported by garbage collection. Garbage collecting, libraries are even available for such uncooperative languages as C and C++. This book considers how dynamic memory can be recycled automatically to guarantee error-free memory management. There is an abundant but disparate literature on the subject, largely confined to research papers. This book sets out to pool this experience in a single accessible and unified framework. Visit this book's companion Website for updates, revisions, online gc resources, bibliography and links to more gc sites 'Whatever else Java has accomplished, it has finally brought garbage collection into the mainstream. The efficiency and correctness of garbage collection algorithms is henceforth going to be of concern to hundreds of thousands of programmers; those who really care about this could do no better than to start with Garbage Collection: Algorithms for Automatic Dynamic Memory Management... the sort of comprehensive engineering manual that is so rare in computing.' Dr Dobb's Journal