Lines Matching defs:hash
39 * Look up an unused entry in the hash table for a given hash. For this
44 hsearch_lookup_free(struct __hsearch *hsearch, size_t hash)
48 for (index = hash, i = 0;; index += ++i) {
56 * Computes an FNV-1a hash of the key. Depending on the pointer size, this
62 size_t hash;
64 hash = offset_basis;
66 hash ^= (uint8_t)*str++;
68 hash *= UINT32_C(16777619);
70 hash *= UINT64_C(1099511628211);
72 return (hash);
80 size_t hash, index, i, old_hash, old_count, new_count;
83 hash = hsearch_hash(hsearch->offset_basis, item.key);
86 * Search the hash table for an existing entry for this key.
87 * Stop searching if we run into an unused hash table entry.
89 for (index = hash, i = 0;; index += ++i) {
106 /* Preserve the old hash table entries. */
112 * yield a hash table that is more than 50% used. By
134 /* Destroy the old hash table entries. */
139 * we insert the entry into the new hash table.
142 entry = hsearch_lookup_free(hsearch, hash);
145 /* Insert the new entry into the hash table. */