lua-users home
lua-l archive

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


 

When I call lua_newthread under low-memory conditions the Lua allocator might fail. I’ve found that this causes Lua to panic.

 

I think that lua_newthread should return null rather than crashing hard. After all, Lua was designed to work with small memory footprints.

 

Is there a reason why lua_newthread can’t fail gracefully? Is the internal state corrupted is some way that can’t be recovered from?

 

Erik Cassel