Hash table that keeps LRU list of entries. More...
#include <lruhash.h>
Data Fields | |
lock_quick_t | lock |
lock for exclusive access, to the lookup array | |
lruhash_sizefunc_t | sizefunc |
the size function for entries in this table | |
lruhash_compfunc_t | compfunc |
the compare function for entries in this table. | |
lruhash_delkeyfunc_t | delkeyfunc |
how to delete keys. | |
lruhash_deldatafunc_t | deldatafunc |
how to delete data. | |
lruhash_markdelfunc_t | markdelfunc |
how to mark a key pending deletion | |
void * | cb_arg |
user argument for user functions | |
size_t | size |
the size of the lookup array | |
int | size_mask |
size bitmask - since size is a power of 2 | |
struct lruhash_bin * | array |
lookup array of bins | |
struct lruhash_entry * | lru_start |
the lru list, start and end, noncyclical double linked list. | |
struct lruhash_entry * | lru_end |
lru list end item (least recently used) | |
size_t | num |
the number of entries in the hash table. | |
size_t | space_used |
the amount of space used, roughly the number of bytes in use. | |
size_t | space_max |
the amount of space the hash table is maximally allowed to use. |
Hash table that keeps LRU list of entries.
the compare function for entries in this table.
Referenced by bin_find_entry(), lruhash_create(), lruhash_insert(), lruhash_lookup(), and lruhash_remove().
how to delete keys.
Referenced by bin_clear(), bin_delete(), lruhash_clear(), lruhash_create(), lruhash_insert(), and lruhash_remove().
how to delete data.
Referenced by bin_clear(), bin_delete(), lruhash_clear(), lruhash_create(), lruhash_insert(), and lruhash_remove().
struct lruhash_entry* lruhash::lru_start |
the lru list, start and end, noncyclical double linked list.
Referenced by check_lru_table(), check_table(), dump_msg_lruhash(), dump_rrset_lruhash(), lru_front(), lru_remove(), lru_touch(), lruhash_clear(), lruhash_create(), and test_lru().
size_t lruhash::num |
the number of entries in the hash table.
Referenced by check_lru_table(), check_table(), lruhash_clear(), lruhash_create(), lruhash_insert(), lruhash_remove(), lruhash_status(), reclaim_space(), and test_long_table().
size_t lruhash::space_used |
the amount of space used, roughly the number of bytes in use.
Referenced by check_lru_table(), check_table(), lruhash_clear(), lruhash_create(), lruhash_insert(), lruhash_remove(), lruhash_status(), and reclaim_space().
size_t lruhash::space_max |
the amount of space the hash table is maximally allowed to use.
Referenced by check_lru_table(), check_table(), lruhash_create(), lruhash_insert(), lruhash_status(), reclaim_space(), slabhash_get_size(), and test_long_table().