Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Documentation of the TIMEFMT variable

> 2023/02/04 5:52, Stephane Chazelas <stephane@xxxxxxxxxxxx> wrote:
> A portability issue. Doc is correct, but code is only correct on
> Darwin/macos.
> 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:

  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.

  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.

Messages sorted by: Reverse Date, Date, Thread, Author