Zephyr Project API  3.4.0
A Scalable Open Source RTOS
sys_hashmap_config Struct Reference

Generic Hashmap configuration. More...

#include <hash_map_api.h>

Data Fields

size_t max_size
 
uint8_t load_factor
 
uint8_t initial_n_buckets
 

Detailed Description

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.

Parameters
max_sizeMaximum number of entries
load_factorMaximum load factor of expressed in hundredths
initial_n_bucketsInitial number of buckets to allocate

Field Documentation

◆ initial_n_buckets

uint8_t sys_hashmap_config::initial_n_buckets

◆ load_factor

uint8_t sys_hashmap_config::load_factor

◆ max_size

size_t sys_hashmap_config::max_size

The documentation for this struct was generated from the following file: