LispWorks User Guide and Reference Manual > 40 The SYSTEM Package

NextPrevUpTopContentsIndex

set-automatic-gc-callback

Function
Summary

Sets a function or functions to call after an automatic GC in 64-bit LispWorks.

Package

system

Signature

set-automatic-gc-callback blocking-gen-num-func &optional other-func => other-func

Arguments

blocking-gen-num-func

A function designator for a function of two arguments, or nil .

other-func

A function designator for a function of one argument, or nil .

Values

other-func

A function designator for a function of one argument, or nil .

Description

The function set-automatic-gc-callback sets a function or functions to call after an automatic garbage collection (GC).

If blocking-gen-num-func is a function designator it should take two arguments: the generation number and, if do-gc in the last call to set-blocking-gen-num was a number, the number of copied segments. It is called whenever the blocking generation is GCed automatically. If blocking-gen-num-func is nil , then this callback is switched off.

If other-func is a function designator it should take one argument, the generation number that was GCed. It is called whenever an automatic GC occurred and blocking-gen-num-func was not called, either because the blocking generation was not GCed, or because blocking-gen-num-func was passed as nil . If other-func is nil (the default) then this callback is switched off.

The calls occur after the GC has finished and there is no restriction on what they can do. If the call ends up allocating enough to trigger another automatic GC, they enter again recursively.

Note: this function is implemented only in 64-bit LispWorks. It is not relevant to the Memory Management API in 32-bit implementations.

See also

set-blocking-gen-num


LispWorks User Guide and Reference Manual - 22 Dec 2009

NextPrevUpTopContentsIndex