Lines Matching +full:lookup +full:- +full:table

2  * util/storage/lruhash.h - hashtable, hash function, LRU keeping.
41 * The hash table keeps a maximum memory size. Old entries are removed
48 * so that the next thread can access the lookup table.
53 * o lookup hash bin.
72 * o lookup hash bin.
102 * doing the next lookup/insert/delete/whatever.
145 * Hash table that keeps LRU list of entries.
148 /** lock for exclusive access, to the lookup array */
150 /** the size function for entries in this table */
152 /** the compare function for entries in this table. */
163 /** the size of the lookup array */
165 /** size bitmask - since size is a power of 2 */
167 /** lookup array of bins */
175 /** the number of entries in the hash table. */
179 /** the amount of space the hash table is maximally allowed to use. */
199 * An entry into the hash table.
228 * Create new hash table.
230 * @param maxmem: maximum amount of memory this table is allowed to use.
238 * @return: new hash table or NULL on malloc failure.
246 * Delete hash table. Entries are all deleted.
247 * @param table: to delete.
249 void lruhash_delete(struct lruhash* table);
252 * Clear hash table. Entries are all deleted, while locking them before
253 * doing so. At end the table is empty.
254 * @param table: to make empty.
256 void lruhash_clear(struct lruhash* table);
265 * @param table: hash table.
268 * If key already present, this entry->key is deleted immediately.
269 * But entry->data is set to NULL before deletion, and put into
274 void lruhash_insert(struct lruhash* table, hashvalue_type hash,
278 * Lookup an entry in the hashtable.
281 * @param table: hash table.
290 struct lruhash_entry* lruhash_lookup(struct lruhash* table,
295 * Caller must hold hash table lock. The entry must be inserted already.
296 * @param table: hash table.
299 void lru_touch(struct lruhash* table, struct lruhash_entry* entry);
304 void lruhash_setmarkdel(struct lruhash* table, lruhash_markdelfunc_type md);
309 * @param table: hash table.
311 * @param diff_size: difference in size to the hash table storage.
312 * This is newsize - oldsize, a positive number uses more space.
314 void lruhash_update_space_used(struct lruhash* table, void* cb_override,
322 * Caller must hold hash table lock. The entry must be inserted already.
323 * @param table: hash table.
326 void lru_demote(struct lruhash* table, struct lruhash_entry* entry);
338 * @param table: hash table.
346 struct lruhash_entry* lruhash_insert_or_retrieve(struct lruhash* table, hashvalue_type hash,
355 * @param table: hash table.
359 void lruhash_remove(struct lruhash* table, hashvalue_type hash, void* key);
361 /** init the hash bins for the table */
365 void bin_delete(struct lruhash* table, struct lruhash_bin* bin);
369 * @param table: hash table with function pointers.
376 struct lruhash_entry* bin_find_entry(struct lruhash* table,
390 * Caller must hold hash table lock.
394 * @param table: hash table with function pointers.
396 * @param newmask: new lookup mask.
398 void bin_split(struct lruhash* table, struct lruhash_bin* newa,
405 * @param table: hash table.
407 * Entries have been removed from the hash table and writelock is held.
409 void reclaim_space(struct lruhash* table, struct lruhash_entry** list);
412 * Grow the table lookup array. Becomes twice as large.
413 * Caller must hold the hash table lock. Must not hold any bin locks.
415 * @param table: hash table.
417 void table_grow(struct lruhash* table);
421 * Caller must hold hash table lock.
422 * @param table: hash table with lru head and tail.
425 void lru_front(struct lruhash* table, struct lruhash_entry* entry);
429 * Caller must hold hash table lock.
430 * @param table: hash table with lru head and tail.
433 void lru_remove(struct lruhash* table, struct lruhash_entry* entry);
436 * Output debug info to the log as to state of the hash table.
437 * @param table: hash table.
438 * @param id: string printed with table to identify the hash table.
441 void lruhash_status(struct lruhash* table, const char* id, int extended);
444 * Get memory in use now by the lruhash table.
445 * @param table: hash table. Will be locked before use. And unlocked after.
448 size_t lruhash_get_mem(struct lruhash* table);
451 * Traverse a lruhash. Call back for every element in the table.
452 * @param h: hash table. Locked before use.