From: Eli Zaretskii <eliz@gnu.org>
To: Paul Eggert <eggert@cs.ucla.edu>
Cc: 24892@debbugs.gnu.org
Subject: bug#24892: {s, }brk removed from FreeBSD 11.x and later, arm64 architecture
Date: Thu, 10 Nov 2016 18:13:24 +0200 [thread overview]
Message-ID: <83a8d7fh3v.fsf@gnu.org> (raw)
In-Reply-To: <b7a8da2b-e0c4-faa7-838a-227d54205d78@cs.ucla.edu> (message from Paul Eggert on Wed, 9 Nov 2016 17:47:19 -0800)
> Cc: 24892@debbugs.gnu.org
> From: Paul Eggert <eggert@cs.ucla.edu>
> Date: Wed, 9 Nov 2016 17:47:19 -0800
>
> 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's strange: how can zero be a useful approximation of the memory
footprint of a running process? What does memory-limit return on your
system?
> 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.
Thanks, 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.
> DEFUN ("memory-limit", Fmemory_limit, Smemory_limit, 0, 0, 0,
> - doc: /* Return the address of the last byte Emacs has allocated, divided by 1024.
> -This may be helpful in debugging Emacs's memory usage.
> -We divide the value by 1024 to make sure it fits in a Lisp integer. */)
> + doc: /* Return zero. */)
> (void)
> {
> - Lisp_Object end;
> -
> -#if defined HAVE_NS || !HAVE_SBRK
> - /* Avoid warning. sbrk has no relation to memory allocated anyway. */
> - XSETINT (end, 0);
> -#else
> - XSETINT (end, (intptr_t) (char *) sbrk (0) / 1024);
> -#endif
> -
> - return end;
> + return make_number (0);
> }
That's too drastic, IMO. We will eventually do that, in time, but
doing that in the same commit that makes the function obsolete is too
soon.
next prev parent reply other threads:[~2016-11-10 16:13 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-07 6:01 bug#24892: {s, }brk removed from FreeBSD 11.x and later, arm64 architecture Ashish SHUKLA
2016-11-07 15:19 ` Eli Zaretskii
2016-11-08 17:54 ` Paul Eggert
2016-11-08 20:11 ` Eli Zaretskii
2016-11-08 21:41 ` Paul Eggert
2016-11-09 3:34 ` Eli Zaretskii
2016-11-09 8:27 ` Paul Eggert
2016-11-09 15:49 ` Eli Zaretskii
2016-11-10 1:47 ` Paul Eggert
2016-11-10 16:13 ` Eli Zaretskii [this message]
2016-11-10 16:59 ` Paul Eggert
2016-11-10 17:24 ` Eli Zaretskii
2016-11-10 0:22 ` Richard Stallman
2016-11-10 1:40 ` Paul Eggert
2016-11-09 4:29 ` Ashish SHUKLA
2016-11-09 8:26 ` Paul Eggert
2016-11-09 9:46 ` Andreas Schwab
2016-11-09 15:50 ` Eli Zaretskii
2016-11-09 17:52 ` Paul Eggert
2016-11-10 9:52 ` Andreas Schwab
2016-11-10 16:23 ` Paul Eggert
2016-11-10 17:00 ` Andreas Schwab
2016-11-10 17:22 ` Paul Eggert
2016-11-10 17:33 ` Andreas Schwab
2016-11-11 2:48 ` Paul Eggert
2016-11-17 17:27 ` Eli Zaretskii
2016-11-18 12:29 ` Ashish SHUKLA
2016-11-18 16:21 ` Paul Eggert
2016-11-18 20:20 ` Ed Maste
2016-11-18 20:23 ` Brooks Davis
[not found] ` <CAPyFy2AL_OZWYpp+tiLSro_3WK1-H8Pdjy4-ZhUQChMQqageUw@mail.gmail.com>
2016-11-18 22:22 ` Paul Eggert
2016-11-19 6:57 ` Eli Zaretskii
2016-11-19 7:20 ` Eli Zaretskii
2017-09-02 13:37 ` Eli Zaretskii
2016-11-09 13:23 ` Ashish SHUKLA
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83a8d7fh3v.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=24892@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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.