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

Re: time builtin vs. time(1): difference in memory numbers



Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> writes:

> 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
> ??

Does Linux needs to divide them by ticks, too?

>
> I'm curious if FreeBSD has anything like this (from <asm/param.h>
> on RHEL4):
>
> #define HZ sysconf(_SC_CLK_TCK)

No but I'm just an average user. Note, sysconf(_SC_CLK_TCK) returns
CLK_TCK (a constant) defined in <time.h> that may differ from the value
used by getrusage(). [1]

[1] NetBSD does get its value from kern.clockrate sysctl
    and there was a discussion to port it to FreeBSD
      http://docs.freebsd.org/cgi/mid.cgi?20020701142849.U6692-100000



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