Frees memory and reduces the size of the image, if possible.
clean-down &optional full => new-size
A generalized boolean.
A positive integer.
clean-down 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
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.
clean-down returns the new size of the Lisp image after reduction, in bytes.
clean-down may fail to delete empty segments if there are static segments in high address space.
clean-down, though it does not do the mark and sweep.
clean-down is implemented as if by
(gc-generation 7 :coalesce t) though you can use gc-generation directly for better control.
clean-down performs the same GC as
clean-down may temporarily increase memory usage, and when called with full
nil may result in a larger Lisp image (though better organized, and therefore behaving better). In 32-bit LispWorks in situations where it is important not to increase memory usage, such as when the operating system signals that memory is low, use reduce-memory instead.
LispWorks® User Guide and Reference Manual - 01 Dec 2021 19:30:35