Electroneum
lruhash Struct Reference

#include <lruhash.h>

Collaboration diagram for lruhash:

Public Attributes

lock_quick_type lock
 
lruhash_sizefunc_type sizefunc
 
lruhash_compfunc_type compfunc
 
lruhash_delkeyfunc_type delkeyfunc
 
lruhash_deldatafunc_type deldatafunc
 
lruhash_markdelfunc_type markdelfunc
 
void * cb_arg
 
size_t size
 
int size_mask
 
struct lruhash_binarray
 
struct lruhash_entrylru_start
 
struct lruhash_entrylru_end
 
size_t num
 
size_t space_used
 
size_t space_max
 

Detailed Description

Hash table that keeps LRU list of entries.

Definition at line 147 of file lruhash.h.

Member Data Documentation

◆ array

struct lruhash_bin* lruhash::array

lookup array of bins

Definition at line 168 of file lruhash.h.

◆ cb_arg

void* lruhash::cb_arg

user argument for user functions

Definition at line 161 of file lruhash.h.

◆ compfunc

lruhash_compfunc_type lruhash::compfunc

the compare function for entries in this table.

Definition at line 153 of file lruhash.h.

◆ deldatafunc

lruhash_deldatafunc_type lruhash::deldatafunc

how to delete data.

Definition at line 157 of file lruhash.h.

◆ delkeyfunc

lruhash_delkeyfunc_type lruhash::delkeyfunc

how to delete keys.

Definition at line 155 of file lruhash.h.

◆ lock

lock_quick_type lruhash::lock

lock for exclusive access, to the lookup array

Definition at line 149 of file lruhash.h.

◆ lru_end

struct lruhash_entry* lruhash::lru_end

lru list end item (least recently used)

Definition at line 173 of file lruhash.h.

◆ lru_start

struct lruhash_entry* lruhash::lru_start

the lru list, start and end, noncyclical double linked list.

Definition at line 171 of file lruhash.h.

◆ markdelfunc

lruhash_markdelfunc_type lruhash::markdelfunc

how to mark a key pending deletion

Definition at line 159 of file lruhash.h.

◆ num

size_t lruhash::num

the number of entries in the hash table.

Definition at line 176 of file lruhash.h.

◆ size

size_t lruhash::size

the size of the lookup array

Definition at line 164 of file lruhash.h.

◆ size_mask

int lruhash::size_mask

size bitmask - since size is a power of 2

Definition at line 166 of file lruhash.h.

◆ sizefunc

lruhash_sizefunc_type lruhash::sizefunc

the size function for entries in this table

Definition at line 151 of file lruhash.h.

◆ space_max

size_t lruhash::space_max

the amount of space the hash table is maximally allowed to use.

Definition at line 180 of file lruhash.h.

◆ space_used

size_t lruhash::space_used

the amount of space used, roughly the number of bytes in use.

Definition at line 178 of file lruhash.h.


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