Data Fields
lruhash Struct Reference

Hash table that keeps LRU list of entries. More...

#include <lruhash.h>

Data Fields

lock_quick_type lock
 lock for exclusive access, to the lookup array
lruhash_sizefunc_type sizefunc
 the size function for entries in this table
lruhash_compfunc_type compfunc
 the compare function for entries in this table. More...
lruhash_delkeyfunc_type delkeyfunc
 how to delete keys. More...
lruhash_deldatafunc_type deldatafunc
 how to delete data. More...
lruhash_markdelfunc_type 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. More...
struct lruhash_entrylru_end
 lru list end item (least recently used)
size_t num
 the number of entries in the hash table. More...
size_t space_used
 the amount of space used, roughly the number of bytes in use. More...
size_t space_max
 the amount of space the hash table is maximally allowed to use. More...

Detailed Description

Hash table that keeps LRU list of entries.

Field Documentation

◆ compfunc

lruhash_compfunc_type lruhash::compfunc

the compare function for entries in this table.

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

◆ delkeyfunc

lruhash_delkeyfunc_type lruhash::delkeyfunc

◆ deldatafunc

lruhash_deldatafunc_type lruhash::deldatafunc

◆ lru_start

struct lruhash_entry* lruhash::lru_start

◆ num

size_t lruhash::num

◆ space_used

size_t lruhash::space_used

◆ space_max

size_t lruhash::space_max

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