Struct hashmap_params

Struct Documentation

struct hashmap_params

Hashmap initialization parameters.

Public Members

dptr_t *meta

Pointer to application-allocated space for storing the hashmap buckets. Ignored unless RCSW_NOALLOC_META is passed.

dptr_t *elements

Pointer to application-allocated space for storing data managed by the hashmap. Ignored unless RCSW_NOALLOC_DATA is passed.

size_t elt_size

Size of elements in bytes.

uint32_t flags

Configuration flags. See hashmap::flags for valid flags.

uint32_t (*hash)(const void *const key, size_t len)

Hashing function to use. Must be non-NULL.

size_t bsize

Initial size of hash buckets; passed to darray_init() as darray_params::init_size; this is also used as darray_params::max_elts ; that is, fixed size hash buckets.

size_t n_buckets

Number of buckets for hashmap.

int sort_thresh

Number of inserts before automatically sorting. -1 = do not automatically sort.