Re: Catch PANIC: unprotected error in call to Lua API (not enough memory) event?

  • From: Mike Pall <mike-1311@xxxxxxxxxx>
  • To: luajit@xxxxxxxxxxxxx
  • Date: Tue, 12 Nov 2013 13:28:00 +0100

Cheyi Lin wrote:
> I'm testing LuaJIT 1G memory limit (v2.0.2 x86_64) and got expected "PANIC:
> unprotected error in call to Lua API (not enough memory)"
> when collectgarbage("count") reports about 926599.
> 
> To prevent process crash, how could I catch the "not enough memory" event?

You can't catch this right now. This issue is mentioned in:
  http://luajit.org/status.html

--Mike

Other related posts: