Re: Catching 'out of memory' using pcall()

  • From: Coda Highland <chighland@xxxxxxxxx>
  • To: luajit@xxxxxxxxxxxxx
  • Date: Thu, 13 Mar 2014 00:12:52 -0700

On Thu, Mar 13, 2014 at 12:06 AM, Dmitri Shubin <sbn@xxxxxxxxxxx> wrote:
> Is it possible to catch 'out of memory' condition using pcall() ?

Handling an "out of memory" condition tends to be pretty hard in general.

Think about it this way: You just tried to allocate a few bytes.

Now you need to invoke an error handler.

Does your error handler need to allocate memory?

/s/ Adam

Other related posts: