|
Data Structures |
| struct | hash_item |
| struct | hash_table |
Defines |
| #define | HASH_ITEMS_PER_BIN 4 |
| #define | hash_table_check(ht) |
Typedefs |
| typedef hash_item | hash_item_t |
Functions |
| hash_item_t * | hash_item_alloc (hash_table_t *ht, void *key, void *value) |
| void | hash_item_free (hash_table_t *ht, hash_item_t *item) |
| void | hash_table_new_intern (hash_table_t *ht, size_t num_bins) |
| hash_table_t * | hash_table_new (void) |
| size_t | hash_table_size (const hash_table_t *ht) |
| | Checks how many items are currently in stored in the hash_table.
|
| size_t | hash_key (const void *key) |
| | NOTE: A naive direct use of the pointer has a much worse distribution e.g., only a quarter of the bins are used.
|
| hash_item_t * | hash_table_find (hash_table_t *ht, const void *key, size_t *bin) |
| void | hash_table_foreach (hash_table_t *ht, hash_table_foreach_func func, void *data) |
| void | hash_table_clear (hash_table_t *ht) |
| void | hash_table_resize_helper (void *key, void *value, void *data) |
| void | hash_table_resize (hash_table_t *ht) |
| void | hash_table_status (const hash_table_t *ht) |
| gboolean | hash_table_insert (hash_table_t *ht, void *key, void *value) |
| | Adds a new item to the hash_table.
|
| gboolean | hash_table_remove (hash_table_t *ht, void *key) |
| void * | hash_table_lookup (hash_table_t *ht, void *key) |
| void | hash_table_destroy (hash_table_t *ht) |