LispWorks User Guide and Reference Manual > 10 Storage Management > 10.3 Memory Management in 32-bit LispWorks

NextPrevUpTopContentsIndex

10.3.6 Behavior of generation 1

When objects are promoted from generation 0 to 1, and there is not enough space in generation 1, the GC tries to free space in generation 1. The first step is to check if sufficient space can be freed by promoting the objects marked for promotion. If this is the case the GC promotes these objects from generation 1 to generation 2. (In practice, this rarely happens.) If this check fails the GC marks and sweeps generation 1. If not enough space is freed by this mark-and-sweep, than either all the objects in generation 1 are promoted, or generation 1 is expanded. This is controlled by expand-generation-1, which specifies whether expansion or promotion takes place.

If generation 1 is expanded, the amount it tries to expand by is the value :new-generation-size ( set by set-gc-parameters) in words (i.e. multiples of 4 bytes), or the amount of free space needed, whichever is bigger. If :new-generation-size is 0, it is not expanded. In this case part of the objects marked for promotion are not promoted.


LispWorks User Guide and Reference Manual - 22 Dec 2009

NextPrevUpTopContentsIndex