All Manuals > LispWorks User Guide and Reference Manual > 10 Storage Management > 10.3 Memory Management in 32-bit LispWorks

NextPrevUpTopContentsIndex

10.3.2 Allocation of objects

Normal allocation is done from a buffer, called the small objects buffer. The GC maintains a pointer to the beginning and end of the buffer, and allocates from it by moving one of the boundaries. When the buffer becomes too small the GC finds another free block and makes that the buffer.

In non-SMP LispWorks there is only one global small objects buffer. In SMP LispWorks, each process may have its own "local" small objects buffer (in addition to the global one). The system decides dynamically which process should have a local buffer and which not. In general processes that do any significant amount of work have a local buffer, and most of their allocation would be from local buffers.

The minimum and maximum size of free block that the GC uses for the small objects buffer can be set by set-gc-parameters, using the keywords :minimum-buffer-size and :maximum-buffer-size . Currently, there is no way to control the behavior of local buffers. Since most of the allocation is from them, these settings are not really significant in SMP LispWorks. If the minimum size is too small, the system allocates buffers more frequently, thus slowing the program. Making the minimum too big causes more fragmentation, because small free blocks are not used. There is no easy way to determine the optimal values for the small objects buffer, except by experiment.

When there is an overflow the small object buffer is allocated in the big-chunk area, and then a bigger buffer is allocated (see below).

10.3.2.1 Allocation of static objects

10.3.2.2 Allocation in different generations


LispWorks User Guide and Reference Manual - 21 Dec 2011

NextPrevUpTopContentsIndex