All Manuals > LispWorks User Guide and Reference Manual > 10 Storage Management > 10.2 Guidance for control of the storage management system

NextPrevUpTopContentsIndex

10.2.2 Permanent data

Permanently-living data will typically be the actual code of the application, and maybe also data that never goes away.

Because the data never goes away, it is best to put it outside normal garbage collection, which means promoting it to the highest generation. You do this by using clean-down.

There are several things that need to be considered when using clean-down:

  1. Saving an image (whether by save-image or deliver) calls clean-down (by default), so there is no need to worry about data in a saved image.
  2. If the permanent data is only a small amount compared to the long-lived data, it is not obvious that clean-down is needed, specially if you use a saved (or delivered) image where the code and maybe some data was already promoted.
  3. clean-down promotes all the data that is live (that is, pointed to from some other live object) in the image when it is called. If the image contains data that is live, but later becomes garbage, it will be promoted and hence not collected until another call to clean-down, which will make the image unnecessarily larger. Since this data is not being accessed, the effect on performance is small, but if there is a lot of it the effect may be significant.
  4. clean-down needs extra memory to operate, especially in 64-bit LispWorks. For very large 64-bit LispWorks images clean-down may fail due to running out of swap memory.
  5. clean-down takes a significant amount of time. If it does not cause paging, it should take seconds, but if it needs to page it may take much longer. You therefore should avoid calling it when you need the application to respond reasonably quickly.

LispWorks User Guide and Reference Manual - 21 Dec 2011

NextPrevUpTopContentsIndex