unbound  0.1
Data Fields
lruhash Struct Reference

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_binarray
 lookup array of bins
struct lruhash_entrylru_start
 the lru list, start and end, noncyclical double linked list.
struct lruhash_entrylru_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.

Detailed Description

Hash table that keeps LRU list of entries.

Field Documentation

lruhash_compfunc_t lruhash::compfunc

the compare function for entries in this table.

Referenced by bin_find_entry(), lruhash_create(), lruhash_insert(), lruhash_lookup(), and lruhash_remove().

lruhash_delkeyfunc_t lruhash::delkeyfunc
lruhash_deldatafunc_t lruhash::deldatafunc
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
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().


The documentation for this struct was generated from the following file: