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: Fri, 11 Jul 2014 09:46:15 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux)

I'm actually wondering what is the use case.  Concretely.

"If file looks so large that `find-file-noselect' is likely to run out of
memory" is not very concrete.  In what kind of situation could this happen?
Especially:
- in which situation is could this be useful given that we
  already have large-file-warning-threshold?
- would using find-file-literally solve the problem?

> 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

Here's another problem: what kind of "free memory" do you measure?
The above "free" measurement should normally be *very* small.
Your above sample of 8G free typically means one of two things:
- The Linux kernel's heuristics failed to make good use of your memory.
- You have too much memory for what you do ("you wasted your money").
So it's perfectly normal to open a file that's larger than this "free"
amount, since the goal of the kernel's memory management is to keep this
"free" about as low as possible (tho not quite 0, just so we can quickly
respond to new memory requests).


        Stefan



reply via email to

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