bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#24892: {s, }brk removed from FreeBSD 11.x and later, arm64 architect


From: Paul Eggert
Subject: bug#24892: {s, }brk removed from FreeBSD 11.x and later, arm64 architecture
Date: Thu, 10 Nov 2016 08:59:11 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0

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.

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.

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?

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.

OK, less-drastic patch attached.

Attachment: 0001-Make-memory-limit-obsolete.patch
Description: Source code patch


reply via email to

[Prev in Thread] Current Thread [Next in Thread]