From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 9020 invoked from network); 3 Feb 2023 20:53:25 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 3 Feb 2023 20:53:25 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1675457605; b=QHiZoYayxbOFiq3bZyeac3FVo+cmrw/aXpWd0pjB/5miL2nKx/FcUwVTl6NpJabf8umV+9acpa YOiHr7S8Ze5BHVbjUtGDiWB6IGwMRnpZW2iJn5jtaebpTmb+b7+TxoFb/FxdzVZXuUrKNlhV7m 3DFmPW+zLy7mExjEFwWK4fNLImDBo1f5uZQjT1x+lWo1iic+KYGtG2tRy6rQPymXd9QrUXGTzB WfPEV0vuPqsounVlJjk84yOl8XLSb70nVf7EBS0jzPDKrXKsDKLEkYO0h5nQRbPtFYdbSbEozv VcMKLHwPqL4MVZSBH6LJda8YzOcueoCezZAx/tNdqNS9RQ==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (relay1-d.mail.gandi.net) smtp.remote-ip=217.70.183.193; dmarc=none header.from=chazelas.org; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1675457605; bh=Xw0lWyvQ4ZDglcVomyl1HhJsjq732uj6Wt7oWPU5css=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:In-Reply-To:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:DKIM-Signature; b=kRW6OnODy5H1ZrzSm/i6Shd0iwejq7X1o/z7nIINh2YYwazVoba+D1qN4sCKpVMi1oPR1xKkQt z7cyGUzJZPuGbsCDABqu49sc2pIUFMVcIGHFEkPRtk60Ro1uZBUlmOHZbtELiQ4qE8yEGc+5tJ zrr5Y9T91BLQqBsLJTxv/vDo2vP5iaCWHpjwS4cENoPrSvej/dISnYx7ZfRg1qoXydUk5KhDOK ZaetLIG3pj6rjI1AgjDBK57VL3uEKTVwDRW0VhkzxLmfJ5RVdslfaCuonwyvVqvYkRdPIuYySJ PyP9X14gN658HKtwikODcsasy74ke1Ba+gzY7D7cm/hikw==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20210803; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=gbgSRzjdC5AJOw4l2GiJqGE/G37BRu3RGFQHNGmUAHo=; b=JMkZKXPcXgRe3c8t1bRs3fD4I0 tW8R0RZymwpUYoKp4X8wDKA02XMwHUEwRAlvNkeq2VFupaGOsy616gqoFNFP1gKCwgjB1VGCBqIFn SjnOLVctjjqWJmvQ3ceuo6pEPtNewq765uYf6OqW++oYdaTLQ/x2GWBAHrt/lANnfoTRhlq4NOczp i1uju2isJakrmKvXR3VMu+T9j2XwEBbPXK36HJ36mFQB+k2qlSRJh4cgZlN6eodLAHk02IW5TPDJq yS0u5ydjyvNCCT0lAxZX0P3NM23/uDLEcpfMbBMCrXbc2AY3uuuHY+Yb5RkVlMt9puzvcYrogavvm bWAbulZw==; Received: by zero.zsh.org with local id 1pO33j-0000jP-VQ; Fri, 03 Feb 2023 20:53:24 +0000 Authentication-Results: zsh.org; iprev=pass (relay1-d.mail.gandi.net) smtp.remote-ip=217.70.183.193; dmarc=none header.from=chazelas.org; arc=none Received: from relay1-d.mail.gandi.net ([217.70.183.193]:60965) by zero.zsh.org with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) id 1pO338-0000Ol-VZ; Fri, 03 Feb 2023 20:52:48 +0000 Received: (Authenticated sender: stephane@chazelas.org) by mail.gandi.net (Postfix) with ESMTPSA id 27275240006; Fri, 3 Feb 2023 20:52:44 +0000 (UTC) Date: Fri, 3 Feb 2023 20:52:44 +0000 From: Stephane Chazelas To: Bart Schaefer Cc: zsh-workers@zsh.org Subject: Re: Documentation of the TIMEFMT variable Message-ID: <20230203205244.bfq7a3zqcs64rtbe@chazelas.org> Mail-Followup-To: Bart Schaefer , zsh-workers@zsh.org References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Seq: 51357 Archived-At: X-Loop: zsh-workers@zsh.org Errors-To: zsh-workers-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-workers-request@zsh.org X-no-archive: yes List-Id: List-Help: , List-Subscribe: , List-Unsubscribe: , List-Post: List-Owner: List-Archive: 2023-02-02 11:33:56 -0800, Bart Schaefer: > On Thu, Feb 2, 2023 at 8:54 AM trillian > 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