Zephyr API Documentation 4.0.0
A Scalable Open Source RTOS
|
Generic Hashmap configuration. More...
#include <hash_map_api.h>
Data Fields | |
size_t | max_size |
Maximum number of entries. | |
uint8_t | load_factor |
Maximum load factor expressed in hundredths. | |
uint8_t | initial_n_buckets |
Initial number of buckets to allocate. | |
Generic Hashmap configuration.
When there is a known limit imposed on the number of entries in the Hashmap, users should specify that via max_size. When the Hashmap should have no artificial limitation in size (and be bounded only by the provided allocator), users should specify SIZE_MAX
here.
The load_factor is defined as the size of the Hashmap divided by the number of buckets. In this case, the size of the Hashmap is defined as the number of valid entries plus the number of invalidated entries.
The initial_n_buckets is defined as the number of buckets to allocate when moving from size 0 to size 1 such that the maximum load_factor property is preserved.
uint8_t sys_hashmap_config::initial_n_buckets |
Initial number of buckets to allocate.
uint8_t sys_hashmap_config::load_factor |
Maximum load factor expressed in hundredths.
size_t sys_hashmap_config::max_size |
Maximum number of entries.