lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Sorry to waste people's time. I read the source, it appears to be
LUAI_MAXCSTACK (in luaconf.h). Its 2048 in 5.1.2, and 8000 in 5.1.4.

On Wed, Jan 28, 2009 at 12:54 PM, Sam Roberts <vieuxtech@gmail.com> wrote:
> Experimentally, it appears to be 2048, but is this adjustable, a
> compile time option, variable depending on environment?
>
>> function T(i) local t={} for _=1,i do t[_] = _ end return t end
>> for i=1,5000 do print(i); unpack(T(i)) end
> ...
> 2047
> 2048
> stdin:1: stack overflow (table too big to unpack)
> stack traceback:
>        [C]: in function 'unpack'
>        stdin:1: in main chunk
>        [C]: ?
>
> Cheers,
> Sam
>