[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: String lifetime (C API)
- From: Mark Hamburg <mhamburg@...>
- Date: Tue, 28 Feb 2006 11:05:01 -0800
Using the pointer after popping would get broken by any short string
optimization that stored short strings in line. (See old mailing list
archives.) Lua doesn't do this right now, but it's a direction that may
prove worth considering since among other things it would probably
significantly reduce the amount of pointer tracing the garbage collector
needs to do.
As for accumulating cruft on the stack, the chief issue to watch out for is
blowing past the guaranteed free space on the stack, but you can deal with
that by growing the stack yourself when necessary.