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#24892: {s, }brk removed from FreeBSD 11.x and later, arm64 architecture Date: Thu, 10 Nov 2016 19:24:31 +0200 Message-ID: <831syjfdtc.fsf@gnu.org> References: <8660nzkevm.fsf@lostca.se> <82a03552-8f33-2dbe-6bb5-54f649b29db7@cs.ucla.edu> <838tsthgut.fsf@gnu.org> <60ed9038-cca2-e772-fbd3-ae31ca38e3d0@cs.ucla.edu> <834m3hgwce.fsf@gnu.org> <83wpgcfybk.fsf@gnu.org> <83a8d7fh3v.fsf@gnu.org> <92e2ea15-6663-2311-f780-b256d0fe078d@cs.ucla.edu> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1478801474 28230 195.159.176.226 (10 Nov 2016 18:11:14 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 10 Nov 2016 18:11:14 +0000 (UTC) Cc: 24892@debbugs.gnu.org To: Paul Eggert Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Nov 10 19:11:09 2016 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 1c4toU-0005xs-P2 for geb-bug-gnu-emacs@m.gmane.org; Thu, 10 Nov 2016 19:11:02 +0100 Original-Received: from localhost ([::1]:48263 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c4toX-000505-MD for geb-bug-gnu-emacs@m.gmane.org; Thu, 10 Nov 2016 13:11:05 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58532) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c4t63-0005nN-Qv for bug-gnu-emacs@gnu.org; Thu, 10 Nov 2016 12:25:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c4t5y-0007V5-66 for bug-gnu-emacs@gnu.org; Thu, 10 Nov 2016 12:25:07 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:37148) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1c4t5y-0007Ut-3G for bug-gnu-emacs@gnu.org; Thu, 10 Nov 2016 12:25:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1c4t5x-0001pF-UI; Thu, 10 Nov 2016 12:25:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 10 Nov 2016 17:25:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24892 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 24892-submit@debbugs.gnu.org id=B24892.14787986846987 (code B ref 24892); Thu, 10 Nov 2016 17:25:01 +0000 Original-Received: (at 24892) by debbugs.gnu.org; 10 Nov 2016 17:24:44 +0000 Original-Received: from localhost ([127.0.0.1]:52547 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c4t5f-0001oc-2r for submit@debbugs.gnu.org; Thu, 10 Nov 2016 12:24:43 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:39065) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c4t5c-0001oN-Jm for 24892@debbugs.gnu.org; Thu, 10 Nov 2016 12:24:41 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c4t5S-0006nF-1K for 24892@debbugs.gnu.org; Thu, 10 Nov 2016 12:24:35 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:46013) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c4t5R-0006nB-Tl; Thu, 10 Nov 2016 12:24:29 -0500 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4855 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1c4t5R-0006iv-6f; Thu, 10 Nov 2016 12:24:29 -0500 In-reply-to: <92e2ea15-6663-2311-f780-b256d0fe078d@cs.ucla.edu> (message from Paul Eggert on Thu, 10 Nov 2016 08:59:11 -0800) 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:125568 Archived-At: > Cc: 24892@debbugs.gnu.org > From: Paul Eggert > Date: Thu, 10 Nov 2016 08:59:11 -0800 > > On 11/10/2016 08:13 AM, Eli Zaretskii wrote: > > how can zero be a useful approximation of the memory footprint of a > > running process? > > It's not, but memory-limit is not about memory footprint. It is, in a way, although it only reports part of that footprint. > > What does memory-limit return on your system? > > 47668, representing about 47 MiB. In contrast, (alist-get 'vsize > (process-attributes (emacs-pid))) returns 807344, representing about 788 > MiB. So 0 is numerically closer to the "correct" answer. "Numerically closer" doesn't mean "useful". Depending on what the user wants, either result could be useful, but zero isn't. > > I think we should have a function that does this in, say, simple.el, > > under a name such as emacs-memory-size, and point to that in the > > obsolescence note. > > Something like that could be done in a later patch. However, the notion > "memory size" is vague and prone to misinterpretation, so any later > patch should be done carefully. And I'm leery of defining a function > that nobody is asking for - if nobody has cared for many years that > memory-limit has been returning bogus values, then why do we need a > function at all? It only returned bogus results on some platforms. FWIW, I'm frequently interested in the Emacs memory footprint, for various reasons, so having a function in Emacs would be handy. > OK, less-drastic patch attached. Thanks, LGTM for master.