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

NextPrevUpTopContentsIndex

set-maximum-memory

Function
Summary

Sets or removes a limit for the top of the Lisp heap in 32-bit LispWorks.

Package

system

Signature

set-maximum-memory address

Arguments

address

An integer address, or nil.

Description

set-maximum-memory sets or removes a limit for the maximum address that the Lisp heap can grow to. If address is an integer, this becomes the maximum address. If address is nil, any limit set by set-maximum-memory is removed.

LispWorks sets the maximum memory on startup. In all cases the system is constrained by the size of the physical memory.

When the maximum memory is reached (either that set by set-maximum-memory or the physical memory limit) the system will become unstable. Therefore this situation should be avoided. The benefit of having the maximum memory set is that a useful error is signaled if the limit is reached.

An application which is likely to grow to the maximum memory should test the amount of available memory using memory-growth-margin or room-values at suitable times, and take action to reclaim memory. Do not rely on handling the error signaled when the maximum memory is reached, since the system is already unstable at this point.

Notes

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

See also

check-fragmentation
mark-and-sweep
memory-growth-margin
room-values
Memory Management in 32-bit LispWorks


LispWorks User Guide and Reference Manual - 20 Sep 2017

NextPrevUpTopContentsIndex