resize-areas

Function

Package: system

Arguments: &key old old-symbols new global-gc tenure expand sift-old-areas pack-heap verbose

This function attempts to restructure the Lisp heap according to the programmer's wishes. These wishes may call for old or new space to be increased in size (usually doable unless the operating system refuses to give up the needed extra space) or to be reduced in size (sometimes doable, but gaps -- foreign data -- above newspace or between the top oldspace and newspace may prevent resizing). Note that other gsgc parameters or requirements may also prevent resizing. This function can modify newspace, the top oldspace, and can coalesce two or more adjacent oldspace areas into one. Arguments control whether a global gc and/or tenuring of objects in newspace are forced prior to resizing.

ArgumentValues and effects
verboseIf non-nil (default nil), print information about what function is doing.
old

For each argument, the number of bytes which should be free in that area (oldspace, oldspace symbols, newspace) after this function returns. Other gsgc parameters may affect the number of free bytes, so the values specified are lower limits. No 5.0/5.0.1 platforms stores symbols separately in oldspace so the value of old-symbols has no effect in release 5.0/5.0.1. old and old-symbols default to 0. new defaults to

(+ (gsgc-parameter :free-bytes-new-pages) (sys:gsgc-parameter :free-bytes-new-other)))

old-symbols
new
global-gcIf true, do a global gc before other actions. Defaults to nil but note that a (perhaps second) global gc is also done later if sift-old-areas and pack-heap are both t.
tenureIf true then tenure all possible data in newspace after processing the global-gc keyword argument but before any other keyword values. Defaults to nil.
expandIf true then expand oldspace or symbol oldspace if necessary, otherwise do nothing if the requested amount is not free. Defaults to t.
sift-old-areasMove data in oldspace down to the oldest oldspace area possible. The hope is that the lower (older) oldspace areas will fill up, leaving the higher (newer) areas empty (or emptier). If both this argument and pack-heap are true, a global gc will occur after sifting and then adjacent empty oldspace areas will be coalesced if possible. Defaults to t. The global gc that occurs if this argument and pack-heap are both true can take an appreciable time so make this argument nil when time is an issue. (Note: in releases prior to 6.0, the argument pack-areas could be used to provide similar functionality to sift-old-areas. In 6.0, the argument pack-areas has been removed and is no longer valid.)
pack-heapReduce the size of the top (newest) old area as much as possible. Defaults to t.

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

The documentation is described in introduction.htm and the index is in index.htm.

Copyright (c) 1998-2000, Franz Inc. Berkeley, CA., USA. All rights reserved.

Created 2000.10.5.