On 2001-Jan-15 23:24:22 +0100, Andrzej Bialecki <[EMAIL PROTECTED]> wrote:
>On Tue, 16 Jan 2001, Hajimu UMEMOTO wrote:
>> +static unsigned int nforks = 0;
>> +SYSCTL_UINT(_kern, KERN_NFORKS, nforks, CTLFLAG_RD, &nforks, 0, "");
>If any, I think this should be long, otherwise on machines like web
>servers the counter will overflow in a short time.

On an i386, "long" and "int" are both 32 bits, hence "long" has a
lower maximum count than "unsigned int".  "unsigned long" might be
a better choice (to give a greater range on the Alpha).

In any case, at 1000 forks/sec, a 32-bit counter will still take
nearly 50 days to wrap.  Lots of other counters will have wrapped
by this time.


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to