33 #define HASHTABLE_LOADFACTOR_NUM 8 34 #define HASHTABLE_LOADFACTOR_DEN 10 42 size = 1 + size * HASHTABLE_LOADFACTOR_DEN / HASHTABLE_LOADFACTOR_NUM;
44 for (size2 = 1; size2 < size; size2 <<= 1) ;
45 if (!(t = calloc(1,
sizeof(
hashtable_t)+ size2 *
sizeof(
unsigned))))
47 if (!(t->
etable = calloc(size2,
sizeof(
void *)))) {
53 #ifndef HASHTABLE_NSTATS long hashcmp_count
The count of hash compares done.
long match_count
The count of matches found.
int size
Size of allocated hashtable.
long entrycmp_count
The count of entry compares done.
long find_count
The count of finds tried.
void ** etable
Table of pointers to entries.
A generic open addressing hashtable.
int count
Number of entries in hashtable.