A meta definition is part of a hashmap.
shmap_t
structshmap__t
compound
The share library meta definitions can be used to hash header information from a socket stream, retaining access to the meta information by a token, and allowing for efficient redelivery or caching.
Note
A sharefs file system associates meta definition information with every inode entry.
shfs_tree
shfs_node
The size of the array is always a power of two. We use the maximum index rather than the size so that we can use bitwise-AND for modular arithmetic. The count of hash entries may be greater depending on the chosen collision rate.
The table is an array indexed by the hash of the key; collisions are resolved by hanging a linked list of hash entries off each element of the array. Although this is a really simple design it isn't too bad given that pools have a low allocation overhead.
shmap_entry_t** shmap_t::array
shmap_index_t shmap_t::iterator
unsigned int shmap_t::count
unsigned int shmap_t::max
shmapfunc_t shmap_t::hash_func
shmap_entry_t* shmap_t::free