107 #ifndef UTIL_STORAGE_LRUHASH_H 108 #define UTIL_STORAGE_LRUHASH_H 114 #define HASH_DEFAULT_STARTARRAY 1024 116 #define HASH_DEFAULT_MAXMEM 4*1024*1024
lruhash_delkeyfunc_type delkeyfunc
void lru_remove(struct lruhash *table, struct lruhash_entry *entry)
struct lruhash_entry * lru_next
std::vector< std::vector< _variant_t > > table
void reclaim_space(struct lruhash *table, struct lruhash_entry **list)
void lru_touch(struct lruhash *table, struct lruhash_entry *entry)
void(* lruhash_deldatafunc_type)(void *, void *)
void bin_overflow_remove(struct lruhash_bin *bin, struct lruhash_entry *entry)
struct lruhash * lruhash_create(size_t start_size, size_t maxmem, lruhash_sizefunc_type sizefunc, lruhash_compfunc_type compfunc, lruhash_delkeyfunc_type delkeyfunc, lruhash_deldatafunc_type deldatafunc, void *arg)
struct lruhash_entry * overflow_next
size_t lruhash_get_mem(struct lruhash *table)
void lruhash_setmarkdel(struct lruhash *table, lruhash_markdelfunc_type md)
lruhash_deldatafunc_type deldatafunc
void(* lruhash_markdelfunc_type)(void *)
struct lruhash_entry * bin_find_entry(struct lruhash *table, struct lruhash_bin *bin, hashvalue_type hash, void *key)
struct lruhash_entry * lru_start
struct lruhash_entry * overflow_list
void lruhash_status(struct lruhash *table, const char *id, int extended)
void lruhash_delete(struct lruhash *table)
lruhash_markdelfunc_type markdelfunc
lruhash_sizefunc_type sizefunc
void(* lruhash_delkeyfunc_type)(void *, void *)
struct lruhash_entry * lruhash_lookup(struct lruhash *table, hashvalue_type hash, void *key, int wr)
void table_grow(struct lruhash *table)
void bin_init(struct lruhash_bin *array, size_t size)
int(* lruhash_compfunc_type)(void *, void *)
void lruhash_clear(struct lruhash *table)
void bin_split(struct lruhash *table, struct lruhash_bin *newa, int newmask)
void lru_demote(struct lruhash *table, struct lruhash_entry *entry)
lruhash_compfunc_type compfunc
void lru_front(struct lruhash *table, struct lruhash_entry *entry)
void lruhash_insert(struct lruhash *table, hashvalue_type hash, struct lruhash_entry *entry, void *data, void *cb_override)
struct lruhash_entry * lru_prev
struct lruhash_entry * lruhash_insert_or_retrieve(struct lruhash *table, hashvalue_type hash, struct lruhash_entry *entry, void *data, void *cb_arg)
size_t(* lruhash_sizefunc_type)(void *, void *)
void lruhash_traverse(struct lruhash *h, int wr, void(*func)(struct lruhash_entry *, void *), void *arg)
struct lruhash_bin * array
void lruhash_remove(struct lruhash *table, hashvalue_type hash, void *key)
void bin_delete(struct lruhash *table, struct lruhash_bin *bin)
struct lruhash_entry * lru_end