Home | History | Annotate | Download | only in cdb

Lines Matching defs:key_hash

129 struct key_hash {
130 SLIST_ENTRY(key_hash) link;
137 SLIST_HEAD(key_hash_head, key_hash);
249 struct key_hash *key_hash;
259 SLIST_FOREACH(key_hash, head, link) {
260 if (key_hash->keylen != keylen)
262 if (key_hash->hashes[0] != hashes[0])
264 if (key_hash->hashes[1] != hashes[1])
266 if (key_hash->hashes[2] != hashes[2])
268 if (memcmp(key, key_hash->key, keylen))
272 key_hash = malloc(sizeof(*key_hash));
273 if (key_hash == NULL)
275 key_hash->key = malloc(keylen);
276 if (key_hash->key == NULL) {
277 free(key_hash);
280 memcpy(key_hash->key, key, keylen);
281 key_hash->hashes[0] = hashes[0];
282 key_hash->hashes[1] = hashes[1];
283 key_hash->hashes[2] = hashes[2];
284 key_hash->keylen = keylen;
285 key_hash->idx = idx;
286 SLIST_INSERT_HEAD(head, key_hash, link);
305 while ((key_hash = SLIST_FIRST(head)) != NULL) {
308 (key_hash->hashes[0] & (new_hash_size - 1));
309 SLIST_INSERT_HEAD(head2, key_hash, link);
323 struct key_hash *key_hash;
328 while ((key_hash = SLIST_FIRST(head)) != NULL) {
330 free(key_hash->key);
331 free(key_hash);
425 struct key_hash *key_hash;
441 SLIST_FOREACH(key_hash, head, link) {
442 mi_vector_hash(key_hash->key, key_hash->keylen,
457 e->idx = key_hash->idx;