aboutsummaryrefslogtreecommitdiff
path: root/lib/isc/include/isc/symtab.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/isc/include/isc/symtab.h')
-rw-r--r--lib/isc/include/isc/symtab.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/lib/isc/include/isc/symtab.h b/lib/isc/include/isc/symtab.h
index 396d64539607..9d0e5e2f23f0 100644
--- a/lib/isc/include/isc/symtab.h
+++ b/lib/isc/include/isc/symtab.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004-2007, 2009 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004-2007, 2009, 2011, 2012 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1996-2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: symtab.h,v 1.24.332.2 2009/01/18 23:47:41 tbox Exp $ */
+/* $Id$ */
#ifndef ISC_SYMTAB_H
#define ISC_SYMTAB_H 1
@@ -57,6 +57,14 @@
* undefined. It can be used to free memory associated with keys and/or
* values.
*
+ * A symbol table is implemented as a hash table of lists; the size of the
+ * hash table is set by the 'size' parameter to isc_symtbl_create(). When
+ * the number of entries in the symbol table reaches three quarters of this
+ * value, the hash table is reallocated with size doubled, in order to
+ * optimize lookup performance. This has a negative effect on insertion
+ * performance, which can be mitigated by sizing the table appropriately
+ * when creating it.
+ *
* \li MP:
* The callers of this module must ensure any required synchronization.
*