Next: , Previous: , Up: Design Choices and Extensions   [Contents][Index]


2.26 Dynamic-Extent Declarations

Note: As of the 19a release, dynamic-extent is unfortunately disabled by default. It is known to cause some issues with CLX and Hemlock. The cause is not known, but causes random errors and brokeness. Enable at your own risk. However, it is safe enough to build all of CMUCL without problems.

On x86 and sparc, CMUCL can exploit dynamic-extent declarations by allocating objects on the stack instead of the heap.

You can tell CMUCL to trust or not trust dynamic-extent declarations by setting the variable *trust-dynamic-extent-declarations*.

Variable: ext:*trust-dynamic-extent-declarations*

If the value of *trust-dynamic-extent-declarations* is NIL, dynamic-extent declarations are effectively ignored.

If the value of this variable is a function, the function is called with four arguments to determine if a dynamic-extent declaration should be trusted. The arguments are the safety, space, speed, and debug settings at the point where the dynamic-extent declaration is used. If the function returns true, the declaration is trusted, otherwise it is not trusted.

In all other cases, dynamic-extent declarations are trusted.

Please note that stack-allocation is inherently unsafe. If you make a mistake, and a stack-allocated object or part of it escapes, CMUCL is likely to crash, or format your hard disk.


Next: Modular Arithmetic, Previous: Function Wrappers, Up: Design Choices and Extensions   [Contents][Index]