nemea-common
1.6.3
|
#include <fast_hash_table.h>
Data Fields | |
uint32_t | table_rows |
uint32_t | key_size |
uint32_t | data_size |
uint32_t | stash_size |
uint32_t | stash_index |
uint8_t * | key_field |
uint8_t * | data_field |
uint8_t * | free_flag_field |
uint8_t * | replacement_vector_field |
uint8_t * | stash_key_field |
uint8_t * | stash_data_field |
uint8_t * | stash_free_flag_field |
int8_t * | lock_table |
int8_t | lock_stash |
uint32_t(* | hash_function )(const void *, int32_t) |
Structure of the hash table.
Replacement vector:
Every row has one replacement vector. Every item is represented by two bits.
0 0 - the 1. newest item in row 0 1 - the 2. newest item in row 1 0 - the 3. newest item in row 1 1 - the oldest item in row
MSB LSB
Bits | X X | X X | X X | X X | Index of item in row 3 2 1 0
Free flag: 0 - free 1 - full
Table free flag: MSB LSB Bits | 0 0 0 0 | X | X | X | X | Index of item in row 3 2 1 0
Definition at line 127 of file fast_hash_table.h.
uint8_t* fht_table_t::data_field |
Pointer to array of data.
Definition at line 135 of file fast_hash_table.h.
uint32_t fht_table_t::data_size |
Size of data in bytes.
Definition at line 131 of file fast_hash_table.h.
uint8_t* fht_table_t::free_flag_field |
Pointer to array of free flags.
Definition at line 136 of file fast_hash_table.h.
uint32_t(* fht_table_t::hash_function) (const void *, int32_t) |
Pointer to used hash function.
Definition at line 143 of file fast_hash_table.h.
uint8_t* fht_table_t::key_field |
Pointer to array of keys.
Definition at line 134 of file fast_hash_table.h.
uint32_t fht_table_t::key_size |
Size of key in bytes.
Definition at line 130 of file fast_hash_table.h.
int8_t fht_table_t::lock_stash |
Lock for stash.
Definition at line 142 of file fast_hash_table.h.
int8_t* fht_table_t::lock_table |
Pointer to array of locks for rows in the table.
Definition at line 141 of file fast_hash_table.h.
uint8_t* fht_table_t::replacement_vector_field |
Pointer to array of replacement_vector_field.
Definition at line 137 of file fast_hash_table.h.
uint8_t* fht_table_t::stash_data_field |
Pointer to array of data of items in stash.
Definition at line 139 of file fast_hash_table.h.
uint8_t* fht_table_t::stash_free_flag_field |
Pointer to array of free flags of items in stash.
Definition at line 140 of file fast_hash_table.h.
uint32_t fht_table_t::stash_index |
Index to the stash, where the next item will be inserted.
Definition at line 133 of file fast_hash_table.h.
uint8_t* fht_table_t::stash_key_field |
Pointer to array of keys of items in stash.
Definition at line 138 of file fast_hash_table.h.
uint32_t fht_table_t::stash_size |
Max number of items in stash.
Definition at line 132 of file fast_hash_table.h.
uint32_t fht_table_t::table_rows |
Number of rows in the table.
Definition at line 129 of file fast_hash_table.h.