[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: warn-maybe-out-of-memory
From: |
Dmitry Antipov |
Subject: |
Re: warn-maybe-out-of-memory |
Date: |
Fri, 11 Jul 2014 08:42:23 +0400 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 |
On 07/10/2014 10:47 PM, Eli Zaretskii wrote:
I wonder if this function should only warn when it is called from
commands invoked by the user, as opposed to from a Lisp program. The
warning is in find-file-noselect, which AFAIK is widely used in Lisp
programs, where displaying this warning might be inappropriate.
Hm, find-file-noselect also may ask for confirmation to open large file.
If this is undesirable, shouldn't we move all user interaction to top-level
find-file?
In addition, the function assumes that visiting a file of size N bytes
needs N bytes of memory, which is false: we need more, sometimes much
more.
No. This function assumes that visiting a file of size N bytes needs
at least N bytes of memory, and warns if we have even less than N.
Also, is this call to emacs_abort really appropriate? Or is it some
remnant from debugging this code?
if (sysinfo (&si))
emacs_abort (); <<<<<<<<<<<<<<<<<<<<<<
Here emacs_abort may be called only if &SI points outside of a process'
address space. This is possible only if C stack is smashed and so you
have no way to continue anyway.
Dmitry
- warn-maybe-out-of-memory, Eli Zaretskii, 2014/07/10
- warn-maybe-out-of-memory, Eli Zaretskii, 2014/07/10
- Re: warn-maybe-out-of-memory, Eli Zaretskii, 2014/07/10
- Re: warn-maybe-out-of-memory,
Dmitry Antipov <=
- Re: warn-maybe-out-of-memory, Eli Zaretskii, 2014/07/11
- Re: warn-maybe-out-of-memory, Dmitry Antipov, 2014/07/11
- Re: warn-maybe-out-of-memory, Eli Zaretskii, 2014/07/11
- Re: warn-maybe-out-of-memory, Dmitry Antipov, 2014/07/11
- Re: warn-maybe-out-of-memory, Eli Zaretskii, 2014/07/11
- Re: warn-maybe-out-of-memory, Eli Zaretskii, 2014/07/11
- Re: warn-maybe-out-of-memory, Dmitry Antipov, 2014/07/11
- Re: warn-maybe-out-of-memory, Eli Zaretskii, 2014/07/11
- Re: warn-maybe-out-of-memory, Stefan Monnier, 2014/07/11
- Re: warn-maybe-out-of-memory, Glenn Morris, 2014/07/12