Home | History | Annotate | Download | only in validator

Lines Matching defs:kcache

52 	struct key_cache* kcache = (struct key_cache*)calloc(1, 
53 sizeof(*kcache));
55 if(!kcache) {
62 kcache->slab = slabhash_create(numtables, start_size, maxmem,
65 if(!kcache->slab) {
67 free(kcache);
70 return kcache;
74 key_cache_delete(struct key_cache* kcache)
76 if(!kcache)
78 slabhash_delete(kcache->slab);
79 free(kcache);
83 key_cache_insert(struct key_cache* kcache, struct key_entry_key* kkey,
90 slabhash_insert(kcache->slab, k->entry.hash, &k->entry,
97 * @param kcache: the key cache.
106 key_cache_search(struct key_cache* kcache, uint8_t* name, size_t namelen,
116 e = slabhash_lookup(kcache->slab, lookfor.entry.hash, &lookfor, wr);
123 key_cache_obtain(struct key_cache* kcache, uint8_t* name, size_t namelen,
128 struct key_entry_key* k = key_cache_search(kcache, name,
152 key_cache_get_mem(struct key_cache* kcache)
154 return sizeof(*kcache) + slabhash_get_mem(kcache->slab);
157 void key_cache_remove(struct key_cache* kcache,
166 slabhash_remove(kcache->slab, lookfor.entry.hash, &lookfor);