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

NextPrevUpTopContentsIndex

set-spare-keeping-policy

Function
Summary

Controls the behavior of the system when a segment is emptied in 64-bit LispWorks.

Package

system

Signature

set-spare-keeping-policy gen-num policy => old-policy

Arguments

gen-num

An integer in the inclusive range [0,7].

policy

A generalized boolean.

Values

old-policy

A generalized boolean.

Description

The function set-spare-keeping-policy controls the behavior of the system when a segment is emptied in 64-bit LispWorks.

If policy is non-nil, then when a segment in generation gen-num is emptied by copying all the objects out from it, it may be kept as a spare segment to be used in the future. This increases the use of virtual memory, but reduces the number of calls to mmap and munmap. It may be useful in applications that allocate at a very high rate.

If timing an application reveals a lot (more than 5%) of time in the "System Time", and especially if this shows up in the GC times produced by extended-time, it may be useful to set the policy to non-nil in generation 1, 2 and maybe in generation 3.

The default policy is nil for all generations, meaning that empty segments are discarded.

The returned value old-policy is the previous policy for the generation gen-num.

Notes

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

See also

extended-time


LispWorks User Guide and Reference Manual - 13 Feb 2015

NextPrevUpTopContentsIndex