Lines Matching full:hash
36 * Look up an unused entry in the hash table for a given hash. For this
41 hsearch_lookup_free(struct __hsearch *hsearch, size_t hash) in hsearch_lookup_free() argument
45 for (index = hash, i = 0;; index += ++i) { in hsearch_lookup_free()
53 * Computes an FNV-1a hash of the key. Depending on the pointer size, this
59 size_t hash; in hsearch_hash() local
61 hash = offset_basis; in hsearch_hash()
63 hash ^= (uint8_t)*str++; in hsearch_hash()
65 hash *= UINT32_C(16777619); in hsearch_hash()
67 hash *= UINT64_C(1099511628211); in hsearch_hash()
69 return (hash); in hsearch_hash()
77 size_t hash, index, i, old_hash, old_count, new_count; in hsearch_r() local
80 hash = hsearch_hash(hsearch->offset_basis, item.key); in hsearch_r()
83 * Search the hash table for an existing entry for this key. in hsearch_r()
84 * Stop searching if we run into an unused hash table entry. in hsearch_r()
86 for (index = hash, i = 0;; index += ++i) { in hsearch_r()
103 /* Preserve the old hash table entries. */ in hsearch_r()
109 * yield a hash table that is more than 50% used. By in hsearch_r()
131 /* Destroy the old hash table entries. */ in hsearch_r()
136 * we insert the entry into the new hash table. in hsearch_r()
139 entry = hsearch_lookup_free(hsearch, hash); in hsearch_r()
142 /* Insert the new entry into the hash table. */ in hsearch_r()