All Manuals > LispWorks® User Guide and Reference Manual > 37 The HCL Package

set-gc-parameters Function

Summary

Sets the parameters for the garbage collector in 32-bit LispWorks. This function is deprecated.

Package

hcl

Signature

set-gc-parameters &key maximum-buffer-size minimum-buffer-size big-object promote-min-buffer promote-max-buffer new-generation-size minimum-overflow maximum-overflow minimum-for-sweep minimum-for-promote enlarge-by-segments

Arguments
maximum-buffer-size
A positive integer or nil.
minimum-buffer-size
A positive integer or nil.
big-object
A positive integer or nil.
promote-min-buffer
A positive integer or nil.
promote-max-buffer
A positive integer or nil.
new-generation-size
A non-negative integer or nil.
minimum-overflow
A positive integer or nil.
maximum-overflow
A positive integer or nil.
minimum-for-sweep
A non-negative integer or nil.
minimum-for-promote
A non-negative integer or nil.
enlarge-by-segments
A positive integer or nil.
Description

The function set-gc-parameters sets the parameters of the garbage collector. Unless stated, arguments are in bytes and values that are nil (the default for all arguments) do not change the corresponding parameter.

If maximum-buffer-size is non-nil, it specifies the maximum size of the small objects buffer.

If minimum-buffer-size is non-nil, it specifies the minimum size of the small objects buffer.

If big-object is non-nil, then an object that is bigger than big-object is "big". That is, it is not allocated from the small objects buffer, but from the big-chunk area (if it is allocated in generation 0 in the normal way).

During promotion, a buffer is allocated in the generation being promoted into, and the objects promoted are moved into it. If promote-min-buffer is non-nil, it controls the minimum size of this buffer.

Likewise, if promote-max-buffer is non-nil it controls the maximum size of the promotion buffer.

If new-generation-size is non-nil, it controls the minimum enlargement of generation gen-num, for gen-num > 0. If new-generation-size is 0, it means the generation is not expanded. Otherwise, new-generation-size must be a fixnum in the exclusive range (10000, 100000000) and the minimum expansion is then new-generation-size * gen-num words. new-generation-size has no effect on the enlargement of generation 0.

If minimum-overflow is non-nil, it specifies the minimum size of the small-objects buffer in the big-chunk area.

If maximum-overflow is non-nil, it specifies the maximum size of the small-objects buffer in the big-chunk area.

If minimum-for-sweep is non-nil, it controls when a mark and sweep takes place. Setting minimum-for-sweep to a high value causes the system to mark and sweep less often, which means it has to grow. The CPU time spent in garbage collection is mostly smaller, but the process is bigger and may cause more disk access.

If minimum-for-promote is non-nil, it controls the frequency of promotions. Setting minimum-for-promote to a high value causes the system to promote less frequently. This may improve performance for programs that allocate a lot of data for a short term and then delete it.

If enlarge-by-segments is non-nil, it specifies a minimum for how much the image grows each time a segment is enlarged, as a multiple of 64 KB. This parameter is ignored when adding a static segment.

Notes

set-gc-parameters is implemented only in 32-bit LispWorks. It is not relevant to the Memory Management API in 64-bit implementations.

See also

get-gc-parameters
11.3 Memory Management in 32-bit LispWorks


LispWorks® User Guide and Reference Manual - 01 Dec 2021 19:30:35