Debugging storage management problems in garbage-collected environments
David Detlefs, Bill Kalsow · 1995
Garbage collection does not solve all storage management problems; programs allocate too much garbage, requiring excess collection, and may retain too much storage, causing heaps to grow too large. This paper discusses these problems and presents tools implemented in the SRC Modula-3 system that help solve them. 1 Introduction Many garbage collection enthusiasts, present authors included, have presented garbage collection as a panacea for all storage management problems. Like all marketing hype, this is something of an exaggeration. This paper discusses storage management problems that occur in garbage-collected systems, and describes some tools used in SRC Modula-3 [4] [6] that aid in detecting and isolating such problems. 2 Problems with automatic storage management A garbage collector solves the two classic problems of explicit storage management: 1. dangling pointers, where a block of storage is deallocated too early, while pointers to the block are still in use. If the block is ...