Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: time builtin vs. time(1): difference in memory numbers
- X-seq: zsh-users 15607
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: Re: time builtin vs. time(1): difference in memory numbers
- Date: Sun, 05 Dec 2010 05:59:11 -0800
- In-reply-to: <86tyisv48o.fsf@xxxxxxxxx>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <868w06l3cq.fsf@xxxxxxxxx> <101204102844.ZM5983@xxxxxxxxxxxxxxxxxxxxxx> <86tyisv48o.fsf@xxxxxxxxx>
[Further discussion on this thread probably should go to zsh-workers.]
On Dec 5, 2:38pm, Anonymous wrote:
} Subject: Re: time builtin vs. time(1): difference in memory numbers
}
} According to getrusage(2) on BSDs ixrss/idrss/isrss are "expressed in
} units of kilobytes * ticks-of-execution". So, I've made a quick hack
}
} http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/152820
Looks like it'd be appropriate to wrap that first hunk in
#ifdef _SC_CLK_TCK
??
I'm curious if FreeBSD has anything like this (from <asm/param.h>
on RHEL4):
#define HZ sysconf(_SC_CLK_TCK)
} Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> writes:
} > } - zsh manual page claims that %M stands for memory in Kbytes while it
} > } displays them in Mbytes
} >
} > Hm. %M stands for ru_maxrss / 1024. Zsh would only be displaying
} > that in Mbytes if ru_maxrss is expressed in Gbytes internally. Has
} > FreeBSD changed the base units of maxrss in rusage?
}
} maxrss like ixrss/idrss/isrss is expressed "in kilobytes"
D'oh, I'm backwards on the multiplication there, so that makes sense.
Some quick searching indicates that ru_maxrss is in fact commonly
returned in KB, but linux kernels prior to Dec 2008 may have used
different units (and even earlier, didn't have this at all).
The code in jobs.c dates from 2004 and the ChangeLog says it's restoring
even older code that was removed at some point, so it is probably based
on neither linux nor FreeBSD. Unless someone can figure out what that
may have been, it's probably safe to remove the "/ 1024".
--
Messages sorted by:
Reverse Date,
Date,
Thread,
Author