lua-users home
lua-l archive

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


> 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