GNU bug report logs - #31852
Make memory-limit obsolete

Previous Next

Package: emacs;

Reported by: Paul Eggert <eggert <at> cs.ucla.edu>

Date: Sat, 16 Jun 2018 01:35:01 UTC

Severity: normal

Tags: patch

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 31852 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Paul Eggert <eggert <at> cs.ucla.edu>
Cc: 31852 <at> debbugs.gnu.org
Subject: Re: bug#31852: Make memory-limit obsolete
Date: Sat, 16 Jun 2018 09:31:23 +0300
> From: Paul Eggert <eggert <at> cs.ucla.edu>
> Date: Fri, 15 Jun 2018 18:33:47 -0700
> 
> The memory-limit function has an implementation that is a relic of 
> long-ago days when the heap was allocated via sbrk. This assumption is 
> often no longer true now that ASLR is popular, and once we get portable 
> dumping work it'll be true even less often. Since memory-limit returns 
> nonsense so often and since nobody cares, we can and should mark 
> memory-limit as obsolete. On its way out we can move it to a Lisp 
> implementation and cause it to be at least somewhat more plausible.
> 
> Proposed patches attached. The first patch moves memory-limit to Lisp, 
> the second one marks it obsolete. I didn't know where to put the Lisp 
> implementation so I put it into lisp/subr.el.

I don't have anything against moving this to Lisp (provided that all
the platforms we care about have a non-trivial implementation of
process-attributes), but I don't understand what we gain by declaring
this tiny function obsolete, especially since the alternative proposed
in the warning is exactly what's used in the proposed Lisp
implementation.  Wouldn't it be enough just to add to the function's
documentation a note that the estimation should be expected to be
inaccurate with modern memory-management technologies?

Thanks.




This bug report was last modified 6 years and 343 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.