VariablePackage: exclToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 10.0
Unrevised from 9.0 to 10.0.
9.0 version

*global-gc-behavior*

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.

Note: this variable works as described only if the value of the variable *gc-after-hook* is its initial value or a function that preserves the initial behavior (of recording bytes tenured correctly). See the description of *gc-after-hook* for information on modifying its value in a way that preserves its initial behavior.

The possible values for *global-gc-behavior* 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 *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 *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 (see the description of gc):

(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 becomes 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 *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

This value should not be used in SMP Lisps (determining when the system is idle is ill-definied in an SMP Lisp). If the *global-gc-behavior* has a value of this type, when more than *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 *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. See particularly section Global garbage collection in that document for information on global garbage collection.


Copyright (c) 1998-2019, Franz Inc. Oakland, CA., USA. All rights reserved.
This page was not revised from the 9.0 page.
Created 2015.5.21.

ToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 10.0
Unrevised from 9.0 to 10.0.
9.0 version