hash map where the same key may be present multiple times More...
Go to the source code of this file.
Data Structures | |
struct | BigMapEntry |
An entry in the hash map with the full key. More... | |
struct | SmallMapEntry |
An entry in the hash map with just a pointer to the key. More... | |
union | MapEntry |
Entry in the map. More... | |
struct | GNUNET_CONTAINER_MultiHashMap |
Internal representation of the hash map. More... | |
struct | GNUNET_CONTAINER_MultiHashMapIterator |
Cursor into a multihashmap. More... | |
Macros | |
#define | LOG(kind, ...) GNUNET_log_from (kind, "util-container-multihashmap", __VA_ARGS__) |
#define | NEXT_CACHE_SIZE 16 |
Maximum recursion depth for callbacks of GNUNET_CONTAINER_multihashmap_get_multiple() themselves s again calling GNUNET_CONTAINER_multihashmap_get_multiple(). More... | |
hash map where the same key may be present multiple times
Definition in file container_multihashmap.c.
#define LOG | ( | kind, | |
... | |||
) | GNUNET_log_from (kind, "util-container-multihashmap", __VA_ARGS__) |
Definition at line 31 of file container_multihashmap.c.
#define NEXT_CACHE_SIZE 16 |
Maximum recursion depth for callbacks of GNUNET_CONTAINER_multihashmap_get_multiple() themselves s again calling GNUNET_CONTAINER_multihashmap_get_multiple().
Should be totally excessive, but if violated we die.
Definition at line 40 of file container_multihashmap.c.
|
static |
Compute the index of the bucket for the given key.
map | hash map for which to compute the index |
key | what key should the index be computed for |
Definition at line 265 of file container_multihashmap.c.
References GNUNET_assert, key, map, and GNUNET_CONTAINER_MultiPeerMap::map_length.
Referenced by GNUNET_CONTAINER_multihashmap_get(), GNUNET_CONTAINER_multihashmap_get_multiple(), and GNUNET_CONTAINER_multihashmap_remove_all().
|
static |
We are about to free() the bme, make sure it is not in the list of next values for any iterator in the map's next_cache.
map | the map to check |
bme | the entry that is about to be free'd |
Definition at line 380 of file container_multihashmap.c.
References MapEntry::bme, map, BigMapEntry::next, GNUNET_CONTAINER_MultiPeerMap::next_cache, and GNUNET_CONTAINER_MultiPeerMap::next_cache_off.
Referenced by GNUNET_CONTAINER_multihashmap_remove_all().
|
static |
We are about to free() the sme, make sure it is not in the list of next values for any iterator in the map's next_cache.
map | the map to check |
sme | the entry that is about to be free'd |
Definition at line 397 of file container_multihashmap.c.
Referenced by GNUNET_CONTAINER_multihashmap_remove_all().
|
static |
Callback used to remove all entries from the map.
cls | the struct GNUNET_CONTAINER_MultiHashMap |
key | the key |
value | the value |
Definition at line 553 of file container_multihashmap.c.
References GNUNET_assert, GNUNET_CONTAINER_multihashmap_remove(), GNUNET_OK, GNUNET_YES, key, map, and value.
Referenced by GNUNET_CONTAINER_multihashmap_clear().
|
static |
Grow the given map to a more appropriate size.
map | the hash map to grow |
Definition at line 645 of file container_multihashmap.c.