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.
try-move-in-generation uses less CPU than
clean-down
, though it does not do the mark and sweep.
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.