Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Documentation of the TIMEFMT variable
- X-seq: zsh-workers 51357
- From: Stephane Chazelas <stephane@xxxxxxxxxxxx>
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- Cc: zsh-workers@xxxxxxx
- Subject: Re: Documentation of the TIMEFMT variable
- Date: Fri, 3 Feb 2023 20:52:44 +0000
- Archived-at: <https://zsh.org/workers/51357>
- In-reply-to: <CAH+w=7b=HjWBgsk_z9D-=yj0zyY3R-Rh=MntdahrGGpU5E1Nbg@mail.gmail.com>
- List-id: <zsh-workers.zsh.org>
- Mail-followup-to: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>, zsh-workers@xxxxxxx
- References: <e3d93b05-42a2-711a-8b11-bad43646fde3@gmail.com> <CAH+w=7b=HjWBgsk_z9D-=yj0zyY3R-Rh=MntdahrGGpU5E1Nbg@mail.gmail.com>
2023-02-02 11:33:56 -0800, Bart Schaefer:
> On Thu, Feb 2, 2023 at 8:54 AM trillian
> <just.so.you.can.email.me@xxxxxxxxx> wrote:
> >
> > The documentation of TIMEFMT says that %M means "The maximum memory the
> > process had in use at any time in kilobytes", but the actual value shown
> > is in megabytes. (The kernel reports it in kilobytes and zsh divides it
> > by 1024 again.)
>
> This has been reported twice before, although after looking at the
> previous two reports I'm not sure if this is a documentation error or
> a coding error or (OS-dependently) both. Anyone?
A portability issue. Doc is correct, but code is only correct on
Darwin/macos. GNU time's autoconf has some info on the subject
IIRC.
It's been reported many times here. See workers/45489,
workers/42363, workers/30399, workers/49145.
macos/darwin is the odd one out. ru_maxrss was already in
kibibytes in the original getrusage() implementation in BSD4.2
in 1985.
--
Stephane
Messages sorted by:
Reverse Date,
Date,
Thread,
Author