MacroPackage: exclToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 8.2
Unrevised from 8.1 to 8.2.
8.1 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 first form of body.

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-2016, Franz Inc. Oakland, CA., USA. All rights reserved.
This page was not revised from the 8.1 page.
Created 2010.1.21.

ToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 8.2
Unrevised from 8.1 to 8.2.
8.1 version