Function | Package: excl | ToC | DocOverview | CGDoc | RelNotes | FAQ | Index | PermutedIndex
| Allegro CL version 9.0 Unrevised from 8.2 to 9.0. 8.2 version

## gc

Arguments: &optional mode (error t)

This function can be used to trigger a scavenge or global gc and to toggle some gsgc switches. The behavior depends on the mode argument. Possible values for mode and their effects are shown in the table below.

gc returns no values.

If mode is not one of the items in the table below, the system signals an error when error is true (the default) or prints a message that the mode is unknown but does not signal an error when error is `nil`. Thus:

    (gc :foo t)
    -> ERROR: Unknown option to gc: :foo

    (gc :foo nil)
    -> Returns nothing, does nothing, prints:
    Unknown option to gc: :foo

See also gc.htm for general information on garbage collection in Allegro CL.

Value of mode | Action
`nil` | Perform a scavenge. This is the default.
`t` | Perform a global garbage collection.
`:mark-for-tenure` | Mark all surviving objects so that they are tenured as soon as convenient and perform a scavenge. Some or all of these objects may be tenured during the current scavenge and some (perhaps all) may be tenured during a later scavenge. (Objects with lispval-storage-type `:panified` are never tenured and are thus unaffected.)
`:tenure` | Perform a scavenge and tenure all surviving objects. All will be tenured when the call to gc completes (contrast with `:mark-for-tenure`, where some surviving objects may not be tenured after the call completes). `(gc :tenure)` will likely take appreciably more time than `(gc :mark-for-tenure)`. (Objects with lispval-storage-type `:panified` are never tenured and are thus unaffected.)
`:show` | Print the names and current values of gc switches and parameters. This argument does not trigger a scavenge or global gc.
`:room` | Equivalent to (room t). This argument does not trigger a scavenge or global gc.
`:print` | Toggles whether messages are printed when a gc occurs. This argument does not trigger a scavenge or global gc.
`:help` | Prints the list of acceptable values for the type argument. This argument does not trigger a scavenge or global gc.

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

|  | ToC | DocOverview | CGDoc | RelNotes | FAQ | Index | PermutedIndex
| Allegro CL version 9.0 Unrevised from 8.2 to 9.0. 8.2 version