Textbook in PDF format
Modern technology developments have made memory management more challenging, interesting and important than ever. This second edition updates the handbook, bringing together a wealth of knowledge gathered by automatic memory management researchers and developers over the past sixty years. The authors compare the most important approaches and state-of-the-art techniques in a single, accessible framework. The book addresses new challenges to garbage collection made by recent advances in hardware and software. It explores the consequences of these changes for designers and implementers of high performance garbage collectors. Along with simple and traditional algorithms, the book covers state-of-the-art parallel, incremental, concurrent and real-time garbage collection. Algorithms and concepts are often described with pseudocode and illustrations. Garbage collection was born in the Lisp programming language. Over sixty years on now, garbage collection is no joke but an essential component of modern programming language implementations. Indeed, Rust and Visual Basic are probably the only widely used languages developed since 1990 not to adopt automatic memory management of some kind, yet Rust provides a reference counted smart pointer and VB.NET, a modern incarnation of Visual Basic, relies on the garbage collector in Microsoft’s Common Language Runtime. Garbage collection continues to be a vibrant area of research and is far from a solved problem. Memory management sits at the crucial interface between the hardware and the programming language. It presents deep problems and challenges, both theoretical and engineering. Garbage collection is probably more important and affects more people than ever before. It is in their phones and their browsers; it is in the servers in the cloud on which so much of modern life depends. The advantages that garbage collected languages offer to software development are legion. Garbage collection eliminates whole classes of bugs, such as attempting to follow dangling pointers that still refer to memory that has been reclaimed or worse, reused in another context. Thus, it helps reduce memory vulnerabilities, by far the most pressing security concern today. It makes it no longer possible to free memory that has already been freed. It reduces the chances of programs leaking memory, although it cannot cure all errors of this kind. It greatly simplifies the construction and use of concurrent data structures. Features of this edition: Provides a complete, up-to-date, and authoritative sequel to the 1996 and 2012 books Offers thorough coverage of parallel, concurrent, and real-time garbage collection algorithms Discusses in detail modern, high-performance commercial collectors Explains some of the trickier aspects of garbage collection, including the interface to the run-time system Over 90 more pages including new chapters on persistence and energy-aware garbage collection Backed by a comprehensive online database of over 3,400 garbage collection-related publications The adoption of garbage collection by almost all modern programming languages makes a thorough understanding of this topic essential for any programmer. This authoritative handbook gives expert insight on how different collectors work as well as the various issues currently facing garbage collectors. Armed with this knowledge, programmers can confidently select and configure the many choices of garbage collectors