[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [ANN] Lua 5.4.0 (rc6) now available
- From: Andrew Gierth <andrew@...>
- Date: Wed, 01 Jul 2020 00:35:11 +0100
>>>>> "Gé" == Gé Weijers <ge@weijers.org> writes:
Gé> BTW: I've built Lua with link time optimization on Linux many
Gé> times, and this problem does not occur, even if you set
Gé> LUAI_MAXCSTACK to 10000.
This is because stack limits on linux (and other unix-style systems)
usually default to massive values compared to windows; for example on my
freebsd amd64 system the default limit is 512MB, and even on my 32-bit
arm system it is 32MB.
Link time optimization (or just building from a single source file) does
(at least in my tests) increase the stack usage because more code is
inlined into luaV_execute, requiring more stack temporaries. (And in
some tests a speedup on the order of 20%)
Stack usage remains a _major_ concern for those of us working in
environments where space is more limited. I am having to resort to
measuring the size of the luaV_execute stack frame at runtime
initialization in order to set a C stack limit small enough to ensure
that Lua code can't blow up the environment.
--
Andrew.