From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#31852: Make memory-limit obsolete Date: Sat, 16 Jun 2018 09:31:23 +0300 Message-ID: <83in6j1bus.fsf@gnu.org> References: <510fa6e2-38e5-f5cf-e1c8-4a1a553a162d@cs.ucla.edu> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1529130609 7453 195.159.176.226 (16 Jun 2018 06:30:09 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 16 Jun 2018 06:30:09 +0000 (UTC) Cc: 31852@debbugs.gnu.org To: Paul Eggert Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Jun 16 08:30:05 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fU4iq-0001jF-Sf for geb-bug-gnu-emacs@m.gmane.org; Sat, 16 Jun 2018 08:30:05 +0200 Original-Received: from localhost ([::1]:50427 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fU4kw-0006Kl-8Z for geb-bug-gnu-emacs@m.gmane.org; Sat, 16 Jun 2018 02:32:14 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49978) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fU4kn-0006KV-D6 for bug-gnu-emacs@gnu.org; Sat, 16 Jun 2018 02:32:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fU4kk-0000gl-91 for bug-gnu-emacs@gnu.org; Sat, 16 Jun 2018 02:32:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:42979) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fU4kk-0000g8-54 for bug-gnu-emacs@gnu.org; Sat, 16 Jun 2018 02:32:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fU4kj-0000pP-UH for bug-gnu-emacs@gnu.org; Sat, 16 Jun 2018 02:32:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 16 Jun 2018 06:32:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 31852 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 31852-submit@debbugs.gnu.org id=B31852.15291307043161 (code B ref 31852); Sat, 16 Jun 2018 06:32:01 +0000 Original-Received: (at 31852) by debbugs.gnu.org; 16 Jun 2018 06:31:44 +0000 Original-Received: from localhost ([127.0.0.1]:50876 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fU4kS-0000ov-MO for submit@debbugs.gnu.org; Sat, 16 Jun 2018 02:31:44 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:58968) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fU4kR-0000oi-3P for 31852@debbugs.gnu.org; Sat, 16 Jun 2018 02:31:43 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fU4kH-00077T-WE for 31852@debbugs.gnu.org; Sat, 16 Jun 2018 02:31:38 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:33190) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fU4kH-000779-Sh; Sat, 16 Jun 2018 02:31:33 -0400 Original-Received: from [176.228.60.248] (port=2794 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1fU4kG-0005PE-Ty; Sat, 16 Jun 2018 02:31:33 -0400 In-reply-to: <510fa6e2-38e5-f5cf-e1c8-4a1a553a162d@cs.ucla.edu> (message from Paul Eggert on Fri, 15 Jun 2018 18:33:47 -0700) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:147477 Archived-At: > From: Paul Eggert > 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.