Contents    Page-10    Prev    Next    Page+10    Index   

Garbage Collection

Garbage collection identifies the cells of memory that are in use; the remaining cells, which are not used for anything, are collected and added to the Free List. This automatic recycling of unused memory is a major advantage of Lisp; it makes it possible for programs to create (`` cons up'') new structures at will without having to worry about explicitly returning unused storage.

Identification of ``in use'' memory starts from symbols, which are always ``in use''. Symbols, in turn, may have several pointers to other data structures:

  1. Binding (value) of the symbol.

  2. Function Definition.

  3. Property List.
Each of these structures, if present, must also be marked as being ``in use''.