next up previous contents
Next: 2.5.1 GC Parameters Up: 2 Design Choices and Previous: 2.4 The Editor

2.5 Garbage Collection

CMU Common Lisp uses a stop-and-copy garbage collector that compacts the items in dynamic space every time it runs. Most users cause the system to garbage collect (GC) frequently, long before space is exhausted. With 16 or 24 megabytes of memory, causing GC's more frequently on less garbage allows the system to GC without much (if any) paging.

The following functions invoke the garbage collector or control whether automatic garbage collection is in effect:

[Function]
extensions:gc

This function runs the garbage collector. If ext:*gc-verbose* is non-nil, then it invokes ext:*gc-notify-before* before GC'ing and ext:*gc-notify-after* afterwards.

[Function]
extensions:gc-off

This function inhibits automatic garbage collection. After calling it, the system will not GC unless you call ext:gc or ext:gc-on.

[Function]
extensions:gc-on

This function reinstates automatic garbage collection. If the system would have GC'ed while automatic GC was inhibited, then this will call ext:gc.





Raymond Toy
Mon Jul 14 09:11:27 EDT 1997