5 Storage Management in Common Lisp

5.1 About storage in Lisp

Liquid Common Lisp manages storage allocation by providing a dynamic area in memory in which Lisp objects can be created. When Lisp objects are created, Lisp automatically allocates memory space for them. When objects are no longer used, a garbage-collecting program reclaims the storage space so that new objects can be created. Lisp programs can thus create objects without explicitly allocating and deallocating memory for them.

Liquid Common Lisp has two garbage collection programs, which are both enabled by default. The Dynamic Garbage Collector is a stop-and-copy compacting garbage collector that reclaims storage in space that is divided into two large dynamic areas. The Ephemeral Garbage Collector is a lifetime-based garbage collector that reclaims storage allocated in small storage areas that supplement the dynamic areas. Ephemeral garbage collection is normally faster than dynamic garbage collection and can reduce or eliminate the number of dynamic garbage collections.

In addition to the garbage-collecting programs that reclaim space, Lisp has a storage allocator that expands memory as required. You can control memory expansion by changing the parameters of the storage allocator.

Storage is normally used as follows:

During development, you can usually proceed without altering the normal garbage collection and storage allocation procedures. If an application requires more memory or a different storage layout, however, you can do the following:


The User's Guide - 9 SEP 1996

Generated with Harlequin WebMaker