All Manuals > LispWorks User Guide and Reference Manual > 32 The HCL Package

NextPrevUpTopContentsIndex

clean-down

Function
Summary

Frees memory and reduces the size of the image, if possible.

Package

hcl

Signature

clean-down &optional full => new-size

Arguments

full controls whether to operate on the highest generation. The default is t .

Values

new-size

The new size of the image, after reduction.

Description

Tries to free as much memory as possible and then reduce the size of the image as much as possible, and also move all the allocated objects to an old generation.

If full is t , clean-down does a mark and sweep on generation 3, promotes all the objects into generation 3, deletes the empty segments and tries to reduce the image size. This is called by default before saving an image.

If full is nil , clean-down does a mark and sweep on generation 2, promotes all the objects to generation 2 and tries to reduce the size of all generations up to 2, but does not touch generation 3.

clean-down may fail to delete empty segments if there are static segments in high address space.

Notes
  1. try-move-in-generation uses less CPU than clean-down , though it does not do the mark and sweep.
  2. In 64-bit LispWorks, clean-down is implemented as if by (gc-generation 7 :coalesce t) though you can use gc-generation directly for better control.
See also

gc-generation
save-image
try-move-in-generation


LispWorks User Guide and Reference Manual - 21 Dec 2011

NextPrevUpTopContentsIndex