emacs-devel
[Top][All Lists]
Advanced

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

Re: warn-maybe-out-of-memory


From: Stefan Monnier
Subject: Re: warn-maybe-out-of-memory
Date: Mon, 14 Jul 2014 23:45:40 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux)

>>> Here's another problem: what kind of "free memory" do you measure?
> "Free" means "immediately available for allocation", i.e. not used by
> OS or other processes for any purpose. If an OS should perform some
> non-trivial action to get more memory (increase swap space or shrink
> some internal data structures), this is not accounted as "free".

Freeing space from the cache is a trivial action.  The OS wants to keep
as much stuff in the cache as it can, thus minimizing the "free" space,
since "free" here basically means "wasted".

If your "free" includes "free in RAM + free in swap" then it's
marginally more useful ("free in RAM" will usually be close to 0,
whereas "free in swap" should usually be fairly large), but I still
can't think of a frequent enough configuration and situation where this
would be useful enough to justify wasting code on it.

>> The performance of Emacs is pretty poor with large files - the default
>> large-file-warning-threshold is 10MB!
> This may be subject to change without notice :-).

If the user changes it, that's her choice, but notice that it is
currently much smaller than anything your "out of memory" check could
hope to detect, so if these small files are already considered
problematic, trying to catch the "yet larger" case seems difficult
to justify.


        Stefan



reply via email to

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