From: Eli Zaretskii <eliz@gnu.org>
To: Paul Eggert <eggert@cs.ucla.edu>
Cc: 31852@debbugs.gnu.org
Subject: bug#31852: Make memory-limit obsolete
Date: Sat, 16 Jun 2018 09:31:23 +0300 [thread overview]
Message-ID: <83in6j1bus.fsf@gnu.org> (raw)
In-Reply-To: <510fa6e2-38e5-f5cf-e1c8-4a1a553a162d@cs.ucla.edu> (message from Paul Eggert on Fri, 15 Jun 2018 18:33:47 -0700)
> From: Paul Eggert <eggert@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.
next prev parent reply other threads:[~2018-06-16 6:31 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-16 1:33 bug#31852: Make memory-limit obsolete Paul Eggert
2018-06-16 6:31 ` Eli Zaretskii [this message]
2018-06-16 13:38 ` Paul Eggert
2018-06-16 15:02 ` Eli Zaretskii
2018-06-16 15:34 ` Paul Eggert
2018-06-16 15:51 ` Daniel Colascione
2018-06-16 16:27 ` Paul Eggert
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83in6j1bus.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=31852@debbugs.gnu.org \
--cc=eggert@cs.ucla.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).