lua-users home
lua-l archive

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

On Tue, Jul 21, 2020 at 10:58 PM Dibyendu Majumdar
<> wrote:

> There was a talk several
> years ago by a Google engineer that said essentially there is no point
> trying to recover after a memory failure. Fail fast is often a better
> approach - because trying to recover in that scenario could cause more
> damage because of further failures.

Either the interpretation is too naive, or the original statement is

No serious OS will fail catastrophically if it cannot satisfy a memory
request from an application. From an "ordinary" application at least.
The event may be catastrophic for an application, but usually not for
the OS and the other applications.

Lua to its host program is as an application to an OS. Lua does not
allocate memory directly -- it uses an allocator specified by the
host. So it is entirely possible for the host to restrict every
instance of Lua, collectively and individually as it deems fit, in its
use of memory. And it is entirely correct that Lua, as an expressly
embedded language, should deal with memory allocation failures