programming-history

Garbage Collection

History

Garbage collection was invented by John McCarthy for the original LISP implementation on the IBM 704 (1958).

Well-known implementations

Boehm

Distinguishing factors

Concurrent vs. blocking (‘stop the world’)

Support for finalization and resurrection

GC triggers

Out of memory

This is the traditional method. When the program tries to allocate some memory and cannot, a reclamation cycle is started to free up memory.

This is simple but there are some disadvantages:

Generational GC counters these problems due to having a small initial generation. This will fill up faster and so there will be less work to do and finalizers will be invoked more promptly.

Incremental