emacs-devel
[Top][All Lists]
Advanced

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

Re: Spare memory


From: Stefan Monnier
Subject: Re: Spare memory
Date: Wed, 13 Jun 2012 19:12:13 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux)

> The `refill_memory_reserve' function (in alloc.c) is a no-op if
> SYSTEM_MALLOC is defined, so the spare memory is never actually
> allocated. Is this intentional?

I do not really understand enough about the way we try to handle
out-of-memory situations to be able to answer.

> Also, why doesn't `memory_full' collect garbage immediately when memory
> is exhausted? (Currently it sets `memory_full_cons_threshold', which is
> checked in `Feval' and `Ffuncall'.)

But I can answer this one: the GC can only be called at a few safe
points, so calling it from memory_full might be unsafe.  With the
conservative stack scanning, we can probably safely run the GC in many
more cases, but when using the GCPROs, the only safe spots are when
`eval' can be called.


        Stefan



reply via email to

[Prev in Thread] Current Thread [Next in Thread]