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

gen-num-segments-fragmentation-state Function

Summary

Shows the fragmentation state in a generation in 64-bit LispWorks.

Package

system

Signature

gen-num-segments-fragmentation-state gen-num &optional statics-too => fragmentation-state

Arguments
gen-num
A number.
statics-too
A generalized boolean?.
Values
fragmentation-state
A list in which each element is a list of length 3.
Description

The function gen-num-segments-fragmentation-state shows the fragmentation state in generation gen-num in 64-bit LispWorks.

gen-num-segments-fragmentation-state returns a list, where each element is a sub-list showing the fragmentation state in a segment. The sub-list is of the form:

(allocation-type allocated free)

where allocation-type is the allocation type of the segment, allocated is the amount of allocated data in the segment, and free is the total size of free areas in the segment that cannot be easily used.

The ratio free/allocated is the ratio that is compared to the fragmentation threshold to decide whether to copy a segment when doing a marking GC with copying (see set-blocking-gen-num and marking-gc).

Allocation types :cons-static, :non-pointer-static, :mixed-static, :other-big and :non-pointer-big are included in the result only if statics-too is non-nil. The default value of statics-too is nil.

Notes
  1. The implementation of set-blocking-gen-num is intended to solve any fragmentation issues automatically.
  2. gen-num-segments-fragmentation-state 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 check-fragmentation is available instead.
See also

check-fragmentation
marking-gc
set-blocking-gen-num
11.2 Guidance for control of the memory management system


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