All Manuals > LispWorks® User Guide and Reference Manual > 47 The SYSTEM Package

set-default-segment-size Function

Summary

Sets the default initial size of a segment in 64-bit LispWorks.

Package

system

Signature

set-default-segment-size gen-num allocation-type size-in-mb => segment-size

Arguments
gen-num
An integer between 0 and 3, inclusive.
allocation-type
One of :cons, :symbol, :function, :non-pointer, :other, :mixed, :cons-static, :non-pointer-static, :mixed-static, :weak, :other-big, and :non-pointer-big.
size-in-mb
A number, or nil.
Values
segment-size
A number.
Description

The function set-default-segment-size sets the default initial size of a segment for a generation gen-num and allocation type allocation-type.

The default initial size is also used as the default size for enlargement of the segment.

allocation-type can be any of the allocation types. However, if allocation-type is :other-big or :non-pointer-big, this function has no effect.

If size-in-mb is a number, it specifies the size in megabytes. If size-in-mb is nil then set-default-segment-size returns the default initial segment size without altering it.

The returned value, segment-size, is the previous default initial segment size.

During automatic garbage collections (GCs) the system collects an ephemeral generation when any of its segments for the main allocation types is full. Thus the size of the segments defines the frequency of GCs in these generations.

Notes

set-default-segment-size is implemented only in 64-bit LispWorks. It does nothing in the Mobile GC and its return value is not meaningful. It is not relevant to the Memory Management API in 32-bit implementations, where enlarge-generation is available.

See also

avoid-gc
enlarge-generation
set-maximum-segment-size
11.4 Memory Management in 64-bit LispWorks


LispWorks® User Guide and Reference Manual - 01 Dec 2021 19:31:02