Comment 12 for bug 2009331

Revision history for this message
Douglas Katzman (dougk) wrote :

> Could one imagine bit-marking all boxed dynamic extent objects
No. The point is to explicitly release memory based on scope. If marked on the stack, then the marks can be clobbered just the same as the object itself. If marked on the heap, then why not just allocate the object on the heap?

> Is there an “Is this stack space?” test one could apply to an object?
stack-allocated-p. I can't see many reasonable uses in a print-object method. Surely it does not make sense to say that objects satisfying that test or containing slots satisfying the test must never be printed.

> As an aside, it seems that SBCL does not impose the CLHS standard of dynamic extent on WITH-OPEN-FILE streams,
Not a lot of savings to be had with files, as file streams allocate several KB for buffering which goes to C memory, and finalizers and other heap-allocated sub-parts.
The spec does not mandate any object to definitely be stack-allocated anyway.