zsh-workers
 help / color / mirror / code / Atom feed
From: Jun T <takimoto-j@kba.biglobe.ne.jp>
To: zsh-workers@zsh.org
Subject: Re: Documentation of the TIMEFMT variable
Date: Fri, 24 Mar 2023 19:25:25 +0900	[thread overview]
Message-ID: <AF1F7D8C-DC13-42BA-A184-D272C22D8F43@kba.biglobe.ne.jp> (raw)
In-Reply-To: <20230203205244.bfq7a3zqcs64rtbe@chazelas.org>


> 2023/02/04 5:52, Stephane Chazelas <stephane@chazelas.org> wrote:
> 
> A portability issue. Doc is correct, but code is only correct on
> Darwin/macos.
(snip)
> macos/darwin is the odd one out. ru_maxrss was already in
> kibibytes in the original getrusage() implementation in BSD4.2
> in 1985.

If ru_maxrss is in KB in all OSes other than macOS, then we can just
check $host_os in configure and set a macro in config.h indicating
that ru_maxrss need be divided by 1024.

But in manpage for Solaris:
https://docs.oracle.com/cd/E86824_01/html/E54766/getrusage-3c.html

  ru_maxrss
  The maximum resident set size. Size is given in pages (the size of a page, in bytes,
  is given by the getpagesize(3C) function). See the NOTES section of this page.

  Notes
  The ru_maxrss, ru_ixrss, ru_idrss, and ru_isrss members of the rusage structure are
  set to 0 in this implementation.

Is there anyone who can confirm that ru_maxrss is set to zero?
If it is always zero, then we need not bother with page to KB conversion.

  parent reply	other threads:[~2023-03-24 10:26 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-02 16:53 trillian
2023-02-02 17:53 ` Daniel Shahaf
2023-02-02 19:33 ` Bart Schaefer
2023-02-03 20:52   ` Stephane Chazelas
2023-02-05  8:36     ` Daniel Shahaf
2023-03-24 10:25     ` Jun T [this message]
2023-03-24 14:43       ` Oliver Kiddle
2023-03-27  0:55         ` Jun T

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=AF1F7D8C-DC13-42BA-A184-D272C22D8F43@kba.biglobe.ne.jp \
    --to=takimoto-j@kba.biglobe.ne.jp \
    --cc=zsh-workers@zsh.org \
    /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 public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).