Re: hashinit versus phashinit

2008-05-06 Thread David Schultz
On Mon, May 05, 2008, Roman Divacky wrote: > hi > > when we want to use a hash table in kernel we call "hashinit" which > initializes a hash table with power-of-2 size. There's also "phashinit" > that creates hash table of size that is a prime number. This was > added in 1995 by davidg@ but it is

Re: hashinit versus phashinit

2008-05-06 Thread Roman Divacky
On Tue, May 06, 2008 at 02:25:56AM -0400, David Schultz wrote: > On Mon, May 05, 2008, Roman Divacky wrote: > > hi > > > > when we want to use a hash table in kernel we call "hashinit" which > > initializes a hash table with power-of-2 size. There's also "phashinit" > > that creates hash table of

Re: hashinit versus phashinit

2008-05-06 Thread Adrian Chadd
2008/5/6 Roman Divacky <[EMAIL PROTECTED]>: > > Most general-purpose hash implementations I've used (e.g., GNU > > libstdc++, Sun JDK, Microsoft .NET) use prime table sizes, > > probably to make it less likely that programmers will shoot > > themselves in the foot with pathological data or ba

Re: hashinit versus phashinit

2008-05-06 Thread Max Laier
On Tuesday 06 May 2008 09:48:30 Roman Divacky wrote: > On Tue, May 06, 2008 at 02:25:56AM -0400, David Schultz wrote: > > On Mon, May 05, 2008, Roman Divacky wrote: > > > hi > > > > > > when we want to use a hash table in kernel we call "hashinit" which > > > initializes a hash table with power-of-

utmp.h: UT_HOSTSIZE

2008-05-06 Thread Lukasz Jaroszewski
Hi, just by curiosity, why #define UT_HOSTSIZE is 16, not 256, like in OtherBSDs and some unix-like-like OSes? :) Regards LVJ ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send an

Re: hashinit versus phashinit

2008-05-06 Thread Johan Bucht
On Tue, May 6, 2008 at 5:08 AM, Adrian Chadd <[EMAIL PROTECTED]> wrote: > 2008/5/6 Roman Divacky <[EMAIL PROTECTED]>: > > > > > > Most general-purpose hash implementations I've used (e.g., GNU > > > libstdc++, Sun JDK, Microsoft .NET) use prime table sizes, > > > probably to make it less like

Re: utmp.h: UT_HOSTSIZE

2008-05-06 Thread Marc Olzheim
On Tue, May 06, 2008 at 03:11:35PM +0200, Lukasz Jaroszewski wrote: > just by curiosity, why #define UT_HOSTSIZE is 16, not 256, like in > OtherBSDs and some unix-like-like OSes? :) Probably historical reasons. It's very much possible to change it though. We've defined it to 64 since FreeBSD 2.

posix semaphores

2008-05-06 Thread Mark Bucciarelli
How reliable is the Posix semaphore support in FreeBSD 7 for interprocess synchronization? Is it not on by default because no one uses it, or because the code isn't trustworthy, or some other reason? Is this what you would recommend for synchronizing access to a shared resource between processes

Re: utmp.h: UT_HOSTSIZE

2008-05-06 Thread Ed Schouten
* Marc Olzheim <[EMAIL PROTECTED]> wrote: > Probably historical reasons. It's very much possible to change it > though. We've defined it to 64 since FreeBSD 2.05 and never really had > any trouble. When increasing it, we shouldn't forget to increase UT_LINESIZE to 16 as well. Using the UNIX 98 P

Re: Improving Syslog

2008-05-06 Thread Robert Watson
On Fri, 2 May 2008, Martin Schütte wrote: I am taking part in this year's Google Summer of Code for NetBSD and want to implement the upcoming IETF Syslog standards for BSD's syslogd(8). The most important improvements will be an extended message format, TLS network transport, and digital sign

Re: Improving Syslog

2008-05-06 Thread Zaphod Beeblebrox
On Tue, May 6, 2008 at 12:21 PM, Robert Watson <[EMAIL PROTECTED]> wrote: > > This sounds like an exciting project -- while I recognize the concerns > other have expressed about complexity, I think that complexity can be > managed if done carefully. I'm not sure if you've looked at Apple's > exte

Re: Improving Syslog

2008-05-06 Thread Robert Noland
On Tue, 2008-05-06 at 12:41 -0400, Zaphod Beeblebrox wrote: > On Tue, May 6, 2008 at 12:21 PM, Robert Watson <[EMAIL PROTECTED]> wrote: > > > > > This sounds like an exciting project -- while I recognize the concerns > > other have expressed about complexity, I think that complexity can be > > man

Re: Improving Syslog

2008-05-06 Thread Martin Schütte
Robert Watson schrieb: managed if done carefully. I'm not sure if you've looked at Apple's extended syslog, which among other things, includes a binary log file format making it more mechanically searched and managed, do take a look if you haven't. I read the asl man pages (http://developer