34 #define HASHTABLE_LOADFACTOR_NUM 8
35 #define HASHTABLE_LOADFACTOR_DEN 10
43 size = 1 + size * HASHTABLE_LOADFACTOR_DEN / HASHTABLE_LOADFACTOR_NUM;
45 for (size2 = 1; size2 < size; size2 <<= 1) ;
46 if (!(t = calloc(1,
sizeof(
hashtable_t)+ size2 *
sizeof(
unsigned))))
48 if (!(t->
etable = calloc(size2,
sizeof(
void *)))) {
54 #ifndef HASHTABLE_NSTATS
74 return _hashtable_next(i);
hashtable_t * htable
The hashtable to iterate over.
int index
The index to scan from next.
void ** etable
Table of pointers to entries.
long find_count
The count of finds tried.
The hashtable iterator type.
int count
Number of entries in hashtable.
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.