Go to the first, previous, next, last section, table of contents.


Garbage Collection

In Lisp, data objects are used very freely; a side effect of this is that it is not possible to (easily) know when an object is stale, that is, no references to it exist and it can therefore be reused.

The garbage collector is used to overcome this problem; whenever enough new data objects have been allocated to make it worthwhile, everything stops and the garbage collector works its way through memory deciding which objects are still in use and which are stale. The stale objects are then recorded as being available for reuse and evaluation continues again.

Function: garbage-collect
Runs the garbage collector, usually this function doesn't need to be called manually.

Variable: garbage-threshold
The number of bytes of data which must be allocated before evaluation will pause and the garbage collector called.

Its default value is about 100K.

See section Idle Actions.


Go to the first, previous, next, last section, table of contents.