lua-users home
lua-l archive

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


On Tue, Jul 21, 2020 at 2:56 PM Dibyendu Majumdar
<mobile@majumdar.org.uk> wrote:
>
> On Tue, 21 Jul 2020 at 22:46, Viacheslav Usov <via.usov@gmail.com> wrote:
> >
> > On Tue, Jul 21, 2020 at 10:58 PM Dibyendu Majumdar
> > <mobile@majumdar.org.uk> 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
> > nonsensical.
> >
>
> For reference
> https://youtu.be/NOCElcMcFik
> At 38m past


The talk was about C++ code, if you get an out-of-memory issue in C++
there's typically not a whole lot you can do to continue a program in
a meaningful way, because there is no pool of unused but unreclaimed
storage you could go and free up. Running the Lua GC may well free up
enough memory, especially if you have a lot of objects with __gc
metamethods, and you don't adjust the garbage collector's settings to
collect faster.

-- 
Gé