On Wed, 10 Dec 2008 14:30:24 +0100, Ivan Voras <[EMAIL PROTECTED]> wrote: >>> Also, it looks like MAXFILES is used only once, and in a bit funny way: >>> >>> 238 maxfiles = MAXFILES; >>> 239 TUNABLE_INT_FETCH("kern.maxfiles", &maxfiles); >>> 240 maxprocperuid = (maxproc * 9) / 10; >>> 241 maxfilesperproc = (maxfiles * 9) / 10; >> >> What's funny about it? > > MAXFILES is a macro used only once, where it resolves to (maxproc*2). > It's not technically incorrect, but it looks like it adds noise.
It doesn't add noise :-) It's arguably a code quality and `documentation' feature. It provides a human-readable, useful name to the "magic" value (maxproc * 2). If we decide to bump the default to (maxproc * 10) sometime later, we won't have to grovel through the entire src/sys/tree and look for maxproc instances that need updating. _______________________________________________ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"