Re: Memory exhaustion: different Lua functions, error messages and exit codes
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: Memory exhaustion: different Lua functions, error messages and exit codes
- From: Roberto Ierusalimschy <roberto@...>
- Date: 2020年5月21日 18:07:19 -0300
> Reading Lua sorces, it is clear the specific message "string too large" is
> the result of a test before the call to allocate memory.
>
> >From the point of view of the consumer of Lua APIs: can also this case be
> part of the big family LUA_ERRMEM ?
The idea of the separate error LUA_ERRMEM is that, when there is memory
exhaustion, there is very little Lua can do before releasing some
memory. (It may not even be able to build a proper error message.) That
is not the case for string too large.
-- Roberto