Beginning with version 9.2.1, ECL operates a tighter control of the resources it uses. In particular, it features explicit limits in the four stacks and in the amount of live data. These limits are optional, can be changed at run time, but they allow users to better control the evolution of a program, handling memory and stack overflow gracefully via the Common Lisp condition system.
The customizable limits are listed in Table 5.1, but they need a careful description.
ext:heap-size limits the total amount of
memory which is available for lisp objects. This is the memory used when
you create conses, arrays, structures, etc.
ext:c-stack controls the size of the
stack for compiled code, including ECL's library itself. This limit is
less stringent than the others. For instance, when code is compiled with
low safety settings, checks for this stack limit are usually omitted, for
ext:binding-stack controls the number of
nested bindings for special variables. The current value is usually safe
enough, unless you have deep recursive functions that bind special
variables, which is not really a good idea.
ext:frame-stack controls the number of
nested blocks, tagbody and other control structures. It affects both
interpreted and compiled code, but quite often compiled code optimizes away
these stack frames, saving memory and not being affected by this
ext:lisp-stack controls the size of the
interpreter stack. It only affects interpreted code.
If you look at Table 5.1, some of these limits may seem very stringent, but they exist to
allow detecting and correcting both stack and memory overflow
conditions. Larger values can be set systematically either in the
~/.eclrc initialization file, or using the command line
options from the table.