Subject: CVS commit: basesrc
To: None <source-changes@netbsd.org>
From: Jaromir Dolecek <jdolecek@netbsd.org>
List: source-changes
Date: 01/28/2001 22:01:43
Module Name:	basesrc
Committed By:	jdolecek
Date:		Sun Jan 28 20:01:43 UTC 2001

Modified Files:
	basesrc/usr.bin/cap_mkdb: cap_mkdb.c

Log Message:
Examine input files and set the openinfo hint accordingly to number of
found records. This makes resulting db for small capability databases
much smaller - for vgrind(1), the resulting vgrindefs.db is about 24KB
instead of ~500KB.

The hint passed to dbopen() is number of records in input files
rounded up to nearest power-of-two value and multiplied by two.
Besides being a nice conservative value, termcap.db become about
70KB bigger if the hint matches the count of records (1023), probably
due to hash overflows.


To generate a diff of this commit:
cvs rdiff -r1.14 -r1.15 basesrc/usr.bin/cap_mkdb/cap_mkdb.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.