Loading...
Searching...
No Matches
hash_map_t Struct Reference

Minimal open-addressing hash map for 64-bit key/value pairs used in deduplication lookup. More...

`#include <aaruformat/hash_map.h>`

## Data Fields

kv_pair_t * | table
| Array of key/value slots of length == size.
size_t | size
| Allocated slot capacity of table.
size_t | count
| Number of active (filled) entries.

## Detailed Description

Minimal open-addressing hash map for 64-bit key/value pairs used in deduplication lookup.

Fields:

- table: Pointer to contiguous array of kv_pair_t entries (capacity == size).
- size: Total number of slots allocated in table (must be >= 1).
- count: Number of occupied (non-empty) slots currently in use.

Load factor guidance: insert performance degrades as count approaches size; callers may rebuild with a larger size when (count * 10 / size) exceeds a chosen threshold (e.g. 70 – 80%). No automatic resizing is performed.

Definition at line 49 of file hash_map.h.

## Field Documentation

## count

size_t hash_map_t::count

Number of active (filled) entries.

Definition at line 53 of file hash_map.h.

Referenced by create_map(), insert_map(), and resize_map().

## size

size_t hash_map_t::size

Allocated slot capacity of table.

Definition at line 52 of file hash_map.h.

Referenced by create_map(), insert_map(), lookup_map(), and resize_map().

## table

kv_pair_t* hash_map_t::table

Array of key/value slots of length == size.

Definition at line 51 of file hash_map.h.

Referenced by create_map(), free_map(), insert_map(), lookup_map(), and resize_map().

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

- include/aaruformat/hash_map.h