*global-gc-behavior*

$Revision: 5.0.2.5 $

Variable

Package: EXCL

This global variable controls the global garbage collection behavior. Depending on its value, global garbage collections do or do not occur automatically and the user is or is not warned about global gc's. The possible values for this variable are given in the following table:

Value

Effect

:auto Whenever the number of bytes tenured since the last global gc exceeds the value of the variable excl:*tenured-bytes-limit*, a global gc will be triggered automatically. After the global gc, the tenured byte count is set to 0.
:warn Whenever the number of bytes tenured since the last global gc or warning exceeds the value of the variable excl:*tenured-bytes-limit*, a warning will be printed to *terminal-io* saying:

Warning: <xxx> bytes have been tenured; (gc t) is recommended

No global gc will be triggered; users have to cause a global gc themselves. A global gc can be triggered immediately by evaluating the form:

(excl:gc t)

A global gc will occur after the next scavenge if you evaluate the following form:

(setf (sys:gsgc-switch :next-gc-is-global) t)

(The switch will be reset to nil after the global gc.) Note that you do not have to act on the warning. Lisp will run perfectly well with no global gc's except that the process size may grow larger than necessary (unless, of course, the process grows so large that the paging overhead become prohibitive or you run out of swap space).

:auto-and-warn The behavior combines that of :auto and :warn. A global gc is triggered when the number of bytes tenured exceeds the value of excl:*tenured-bytes-limit* and a warning message, explaining that a global gc is occurring, is also printed. The warning message is designed to tell the user why Lisp seems to have stopped for a while (global gc's can take several minutes to complete).
A list of 2 or 3 elements The contents of the list are, in order:

timeout

a positive integer, specifying a number of seconds

factor

a real >= 1.0

verbose

(optional) t or nil

If the *global-gc-behavior* has a value of this type, when more than excl:*tenured-bytes-limit* bytes have been tenured since the last global gc, a global gc will be triggered automatically the next time the system has been completely idle for timeout seconds. But if excl:*tenured-bytes-limit* is exceeded by factor, a global gc will happen anyway. If the boolean is present and true, the mechanism will print its actions to *initial-terminal-io*.

nil No warning will be printed and no global gc will be triggered automatically regardless of the number of bytes tenured.

Note that binding this variable will likely not have the desired effect. Lisp usually runs with multiprocessing enabled (since that is required by the Emacs-Lisp interface). If you bind this variable in one process, the binding will not be seen by another process which could swap in and cause a global gc.

See gc.htm for more information on garbage collection and gsgc parameters.

The general documentation description is in introduction.htm. The index is in index.htm.

Copyright (C) 1998-1999, Franz Inc., Berkeley, CA. All Rights Reserved.