Struct hashmap
Defined in File hashmap.h
Struct Documentation
-
struct hashmap
The hashmap data structure (an associative array).
The elements in this data structure are hashnode objects, and the nodes are the dynamic arrays (darray) used to implement the buckets.
Public Members
-
uint32_t (*hash)(const void *const key, size_t len)
Hashing function. Can’t be NULL (duh).
-
struct hashmap_space_mgmt space
Management of all node and element space for the hashmap.
-
size_t elt_size
Size of data elements for hashmap.
-
size_t max_elts
Max number of of elements allowed in the hashmap.
-
size_t n_buckets
Number of of buckets in the hashmap. Does not change after initialization.
-
struct hashmap_stats stats
Current hashmap statistics
-
int sort_thresh
Number of of successful adds to wait before automatically sorting hashmap. -1 = do not automatically sort hashmap (sorting must be done manually) via hashmap_sort().
-
uint32_t flags
Run time configuration flags. Valid flags are:
All other flags are ignored.
-
uint32_t (*hash)(const void *const key, size_t len)