Garbage collection

From Computer History Wiki
Jump to: navigation, search

Garbage collection (sometimes referred to as GC) refers to searching for, and retrieving for re-use, resources that were previously allocated, but which are now unused. (Many times it is easy to recycle resources immediately when their use ceases - e.g. by use of a reference count or similar mechanism, but this is not always the case.)

Garbage collection started with the LISP programming language; it has operations that allocate a cell in main memory ('CONS'), but further operations can often leave cells which are no longer reachable; in the limited memory of that period, a garbage collection pass was necessary to allow continued operation.