MacroPackage: exclToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 10.1
Unrevised from 10.0 to 10.1.
10.0 version

tenuring

Arguments: &body body

Use this macro to immediately tenure all objects allocated while within the scope of body. This macro is normally used when loading files, or performing some other operation where the objects created will not become garbage in the short term. (Objects with lispval-storage-type  :panified are never tenured and are thus unaffected.)

A tenuring form returns the values of the last form of body, as if in a progn.

This macro is very useful for preventing newspace expansion. Without the tenuring macro, loading a very large fasl file may cause the newspace to expand to several times its previous size. With the tenuring macro, the newspace will not grow as severely, which will usually improve performance in the resulting Lisp.

tenuring works (as can be seen in the macroexpansion) by setting the :generation-spread gsgc-parameter to 0, then executing the body, then calling gc (without arguments thus performing a scavenge) twice, and finally resetting the :generation-spread to its old value. There may be additional scavenges while the body is executing. gc is called twice because objects that according to the parameters should be tenured during a scavenge sometimes are not for system reasons. The additional scavenge usually ensures such objects are indeed tenured.

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


Copyright (c) 1998-2022, Franz Inc. Lafayette, CA., USA. All rights reserved.
This page was not revised from the 10.0 page.
Created 2019.8.20.

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