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: Eli Zaretskii
Subject: Re: warn-maybe-out-of-memory
Date: Fri, 11 Jul 2014 13:00:50 +0300

> Date: Fri, 11 Jul 2014 13:43:31 +0400
> From: Dmitry Antipov <address@hidden>
> CC: address@hidden
> 
> On 07/11/2014 01:02 PM, Eli Zaretskii wrote:
> 
> > I mean the cases where the file size is borderline, near the available
> > memory, but slightly less than that.
> 
> We may warn if file size reaches or exceeds, say, 90% of available memory.

That's a good start.  But decoding non-ASCII text could expand the
size by a factor of 2 in many cases, so perhaps 50% is a better
threshold, at least in non-English locales?

> > Then how does this feature make sense?  It is, according to you,
> > unpredictable and uncontrollable.
> 
> This depends on OS and VM pressure. For example, on GNU/Linux if I have
> just slightly above 8G free:
> 
> $ free
>               total       used       free     shared    buffers     cached
> Mem:      16127204    7762072    8365132      68248      84396    6401276
> -/+ buffers/cache:    1276400   14850804
> 
> and asks for 10G, the kernel may shrink page cache by 2G and satisfy
> 10G mmap request, thus fooling the logic I'm using to issue the warning.

On Windows, the swap file is enlarged in this situation.

> But under some circumstances, this may be not so; in short, I think that
> we need to support more OSes and gather more feedback from users.

Agreed.

Btw, this feature is all but useless for 32-bit builds on any modern
machine, since the buffer size limitation almost always hits much
sooner.



reply via email to

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