From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.bugs Subject: bug#24892: {s, }brk removed from FreeBSD 11.x and later, arm64 architecture Date: Wed, 9 Nov 2016 17:47:19 -0800 Organization: UCLA Computer Science Department Message-ID: 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> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------991E8C4BCCD8FD338467EE6B" X-Trace: blaine.gmane.org 1478742519 1098 195.159.176.226 (10 Nov 2016 01:48:39 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 10 Nov 2016 01:48:39 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 Cc: 24892@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Nov 10 02:48:35 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 1c4eTI-0004t4-4M for geb-bug-gnu-emacs@m.gmane.org; Thu, 10 Nov 2016 02:48:08 +0100 Original-Received: from localhost ([::1]:43352 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c4eTL-0007iC-5F for geb-bug-gnu-emacs@m.gmane.org; Wed, 09 Nov 2016 20:48:11 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58189) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c4eTF-0007i2-NE for bug-gnu-emacs@gnu.org; Wed, 09 Nov 2016 20:48:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c4eTC-0007sI-Kw for bug-gnu-emacs@gnu.org; Wed, 09 Nov 2016 20:48:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:36100) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1c4eTC-0007ry-Hp for bug-gnu-emacs@gnu.org; Wed, 09 Nov 2016 20:48:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1c4eTC-00036j-9n; Wed, 09 Nov 2016 20:48:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 10 Nov 2016 01:48:02 +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.147874244711891 (code B ref 24892); Thu, 10 Nov 2016 01:48:02 +0000 Original-Received: (at 24892) by debbugs.gnu.org; 10 Nov 2016 01:47:27 +0000 Original-Received: from localhost ([127.0.0.1]:51498 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c4eSd-00035j-JL for submit@debbugs.gnu.org; Wed, 09 Nov 2016 20:47:27 -0500 Original-Received: from zimbra.cs.ucla.edu ([131.179.128.68]:46642) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c4eSc-00035X-Ct for 24892@debbugs.gnu.org; Wed, 09 Nov 2016 20:47:26 -0500 Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id D275C160F94; Wed, 9 Nov 2016 17:47:20 -0800 (PST) Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id YUH7CfpIvMHp; Wed, 9 Nov 2016 17:47:20 -0800 (PST) Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 2523C1611E4; Wed, 9 Nov 2016 17:47:20 -0800 (PST) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id bmgtZIStD88p; Wed, 9 Nov 2016 17:47:20 -0800 (PST) Original-Received: from Penguin.CS.UCLA.EDU (Penguin.CS.UCLA.EDU [131.179.64.200]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 098CA160F94; Wed, 9 Nov 2016 17:47:20 -0800 (PST) In-Reply-To: <83wpgcfybk.fsf@gnu.org> 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:125542 Archived-At: This is a multi-part message in MIME format. --------------991E8C4BCCD8FD338467EE6B Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit On 11/09/2016 07:49 AM, Eli Zaretskii wrote: > we could lift the implementation from > system_process_attributes, we report there the process memory size. That number is not that relevant to the intent of memory-limit, and on my platform (Fedora 24 x86-64) returning 0 is a better approximation. That being said, we can add some help along those lines, in the attached patch, slightly modified from the original to suggest (alist-get 'vsize (process-attributes (emacs-pid))) for users who prefer the virtual memory size. --------------991E8C4BCCD8FD338467EE6B Content-Type: application/x-patch; name="0001-Make-memory-limit-obsolete.patch" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="0001-Make-memory-limit-obsolete.patch" RnJvbSA1ZWUyZTY1MGE0ZDlkMTU5OWJkNGNiYzMxNTU3ZWEzMTA3Njc4NGY3IE1vbiBTZXAg MTcgMDA6MDA6MDAgMjAwMQpGcm9tOiBQYXVsIEVnZ2VydCA8ZWdnZXJ0QGNzLnVjbGEuZWR1 PgpEYXRlOiBXZWQsIDkgTm92IDIwMTYgMTc6NDU6MjQgLTA4MDAKU3ViamVjdDogW1BBVENI XSBNYWtlICdtZW1vcnktbGltaXQnIG9ic29sZXRlCgoqIGRvYy9saXNwcmVmL2ludGVybmFs cy50ZXhpIChHYXJiYWdlIENvbGxlY3Rpb24pOgpEbyBub3QgZG9jdW1lbnQgbWVtb3J5LWxp bWl0LgoqIGV0Yy9ORVdTOiBEb2N1bWVudCB0aGlzLgoqIGxpc3AvZW1hY3MtbGlzcC9ieXRl LW9wdC5lbCAoc2lkZS1lZmZlY3QtZnJlZS1mbnMpOgpSZW1vdmUgbWVtb3J5LWxpbWl0Lgoq IGxpc3Avc3Vici5lbCAobWVtb3J5LWxpbWl0KTogTm93IG9ic29sZXRlLgoqIHNyYy9hbGxv Yy5jIChGbWVtb3J5X2xpbWl0KTogQWx3YXlzIHJldHVybiAwLgotLS0KIGRvYy9saXNwcmVm L2ludGVybmFscy50ZXhpICB8IDE0IC0tLS0tLS0tLS0tLS0tCiBldGMvTkVXUyAgICAgICAg ICAgICAgICAgICAgfCAgNCArKysrCiBsaXNwL2VtYWNzLWxpc3AvYnl0ZS1vcHQuZWwgfCAg MiArLQogbGlzcC9zdWJyLmVsICAgICAgICAgICAgICAgIHwgIDMgKysrCiBzcmMvYWxsb2Mu YyAgICAgICAgICAgICAgICAgfCAxNSArKy0tLS0tLS0tLS0tLS0KIDUgZmlsZXM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