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: Thu, 10 Jul 2014 21:47:37 +0300

> Date: Thu, 10 Jul 2014 21:23:32 +0300
> From: Eli Zaretskii <address@hidden>
> Cc: address@hidden
> 
> 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.
> 
> 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.

Also, is this call to emacs_abort really appropriate?  Or is it some
remnant from debugging this code?

  DEFUN ("memory-info", Fmemory_info, Smemory_info, 0, 0, 0,
         doc: /* Return a list of (TOTAL-RAM FREE-RAM TOTAL-SWAP FREE-SWAP).
  All values are in Kbytes.  If there is no swap space, last two
  values are zero.  If the system is not supported, return nil.  */)
    (void)
  {
  #ifdef HAVE_LINUX_SYSINFO
    struct sysinfo si;
    uintmax_t units;

    if (sysinfo (&si))
      emacs_abort ();  <<<<<<<<<<<<<<<<<<<<<<



reply via email to

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