5 Storage Management in Common Lisp

5.4 Controlling memory expansion

Lisp automatically expands memory as needed during the execution of a program. You can control memory expansion either by changing the parameters that control automatic memory expansion or by explicitly expanding the dynamic areas and the reserved area.

In general, you should use the default parameters and monitor the progress of garbage collections and memory expansion. If garbage collections occur often or if the dynamic or reserved areas are expanded too frequently, you can increase the size of these areas to reduce the number of garbage collections.

If your application requires a specific amount of memory and you are concerned about efficient memory use, you can adjust the memory management parameters to accommodate the application. To adjust the parameters, you must know how much memory the application uses. Ephemeral garbage collection normally reduces the amount of dynamic space needed by your application, so if you have already adjusted an application for use with just dynamic garbage collection, you should reevaluate the application's storage needs when using ephemeral garbage collection. You can use the following general guidelines to determine an application's memory needs:

The functionchange-memory-management allows you to change the parameters that control memory expansion and to explicitly expand the dynamic and reserved areas.

5.4.1 - Changing memory expansion parameters
5.4.2 - Explicitly expanding memory

The User's Guide - 9 SEP 1996

Generated with Harlequin WebMaker