From: Wouter Wijngaards Date: Tue, 27 Mar 2007 10:01:39 +0000 (+0000) Subject: Nicer words for slab hash. X-Git-Tag: release-0.2~27 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ccf3d7190d1b8a4ea0cd0383f5b617ec842fe426;p=thirdparty%2Funbound.git Nicer words for slab hash. git-svn-id: file:///svn/unbound/trunk@200 be551aaa-1e26-0410-a405-d3ace91eadb9 --- diff --git a/doc/Changelog b/doc/Changelog index 393fd2bcd..11d27cb15 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -3,6 +3,8 @@ - testbound can give config file and commandline options from the replay file to unbound. - created test that checks if items drop out of the cache. + - added word 'partitioned hash table' to documentation on slab hash. + A slab hash is a partitioned hash table. 26 March 2007: Wouter - config settings for slab hash message cache. diff --git a/testcode/testbound.c b/testcode/testbound.c index 67448f8e5..64cad1619 100644 --- a/testcode/testbound.c +++ b/testcode/testbound.c @@ -125,7 +125,8 @@ setup_config(FILE* in, char* configfile, int* lineno, char line[MAX_LINE_LEN]; char* parse; FILE* cfg; - sprintf(configfile, "/tmp/testbound_cfg_%u.tmp", (unsigned)getpid()); + snprintf(configfile, MAX_LINE_LEN, "/tmp/testbound_cfg_%u.tmp", + (unsigned)getpid()); add_opts("-c", pass_argc, pass_argv); add_opts(configfile, pass_argc, pass_argv); cfg = fopen(configfile, "w"); @@ -194,7 +195,7 @@ main(int argc, char* argv[]) int init_optind = optind; char* init_optarg = optarg; struct replay_scenario* scen = NULL; - char cfgfile[128]; + char cfgfile[MAX_LINE_LEN]; log_init(NULL); log_info("Start of %s testbound program.", PACKAGE_STRING); diff --git a/util/storage/slabhash.c b/util/storage/slabhash.c index 929e5e170..e0d917c84 100644 --- a/util/storage/slabhash.c +++ b/util/storage/slabhash.c @@ -37,6 +37,7 @@ * \file * * Implementation of hash table that consists of smaller hash tables. + * This results in a partitioned lruhash table. * It cannot grow, but that gives it the ability to have multiple * locks. Also this means there are multiple LRU lists. */ diff --git a/util/storage/slabhash.h b/util/storage/slabhash.h index 7fde7caf4..0ceee9264 100644 --- a/util/storage/slabhash.h +++ b/util/storage/slabhash.h @@ -47,6 +47,7 @@ /** * Hash table formed from several smaller ones. + * This results in a partitioned lruhash table. * None of the data inside the slabhash may be altered. * Therefore, no locks are needed to access the structure. */