5.3.2 The Ephemeral Garbage Collector

5.3.2.2 Modifying ephemeral storage allocation

The three default ephemeral levels are sufficient for most applications. If necessary, however, you can use the functionegc-options to change the size and number of ephemeral levels.

You can make the following kinds of changes to ephemeral storage allocation:

Increase the size of the levels if the number of objects created by your application overflows or approaches the limit of an ephemeral level before the objects are discarded.

Specify the size of the largest object if your application normally creates small objects but occasionally creates large, long-lived objects, such as windows, large arrays, or hashtables, that would overflow the ephemeral levels. Any object larger than the specified limit is then allocated in the current dynamic semi-space rather than in the current ephemeral level.

Increase the number of ephemeral levels if too many short-lived objects are being saved in dynamic space. Adding more levels forces a Lisp object to survive a large number of garbage collections to become a semi-permanent object in dynamic space. This eliminates short-lived objects and reduces the number of saved objects.

Note that adding many ephemeral levels increases the size of the ephemeral space and can increase the amount of paging because all of the Lisp objects cannot be kept in physical memory. Using too many levels also means that long-lived objects are copied many times before they become semi-permanent objects in dynamic space.

The combined sizes of the ephemeral levels cannot exceed the size of one dynamic semi-space. If you try to expand ephemeral space beyond this limit, Lisp allocates either fewer levels than requested or smaller levels or both.

To expand ephemeral space beyond the current size of one dynamic semi-space, you must first expand dynamic space by calling the functionchange-memory-management. Then specify the number and sizes of the ephemeral levels by calling the functionegc-options.


The User's Guide - 9 SEP 1996

Generated with Harlequin WebMaker