• Home
  • Raw
  • Download

Lines Matching full:bucket

69 	struct hash_bucket *bucket, *bucket_end;  in hash_free()  local
74 bucket = hash->buckets; in hash_free()
75 bucket_end = bucket + hash->n_buckets; in hash_free()
76 for (; bucket < bucket_end; bucket++) { in hash_free()
79 entry = bucket->entries; in hash_free()
80 entry_end = entry + bucket->used; in hash_free()
84 free(bucket->entries); in hash_free()
151 struct hash_bucket *bucket = hash->buckets + pos; in hash_add() local
154 if (bucket->used + 1 >= bucket->total) { in hash_add()
155 unsigned new_total = bucket->total + hash->step; in hash_add()
157 struct hash_entry *tmp = realloc(bucket->entries, size); in hash_add()
160 bucket->entries = tmp; in hash_add()
161 bucket->total = new_total; in hash_add()
164 entry = bucket->entries; in hash_add()
165 entry_end = entry + bucket->used; in hash_add()
183 bucket->used++; in hash_add()
194 struct hash_bucket *bucket = hash->buckets + pos; in hash_add_unique() local
197 if (bucket->used + 1 >= bucket->total) { in hash_add_unique()
198 unsigned new_total = bucket->total + hash->step; in hash_add_unique()
200 struct hash_entry *tmp = realloc(bucket->entries, size); in hash_add_unique()
203 bucket->entries = tmp; in hash_add_unique()
204 bucket->total = new_total; in hash_add_unique()
207 entry = bucket->entries; in hash_add_unique()
208 entry_end = entry + bucket->used; in hash_add_unique()
222 bucket->used++; in hash_add_unique()
239 const struct hash_bucket *bucket = hash->buckets + pos; in hash_find() local
245 &se, bucket->entries, bucket->used, in hash_find()
258 struct hash_bucket *bucket = hash->buckets + pos; in hash_del() local
265 entry = bsearch(&se, bucket->entries, bucket->used, in hash_del()
273 entry_end = bucket->entries + bucket->used; in hash_del()
277 bucket->used--; in hash_del()
280 steps_used = bucket->used / hash->step; in hash_del()
281 steps_total = bucket->total / hash->step; in hash_del()
285 struct hash_entry *tmp = realloc(bucket->entries, size); in hash_del()
287 bucket->entries = tmp; in hash_del()
288 bucket->total = (steps_used + 1) * hash->step; in hash_del()
303 iter->bucket = 0; in hash_iter_init()
310 const struct hash_bucket *b = iter->hash->buckets + iter->bucket; in hash_iter_next()
318 for (iter->bucket++; iter->bucket < iter->hash->n_buckets; in hash_iter_next()
319 iter->bucket++) { in hash_iter_next()
320 b = iter->hash->buckets + iter->bucket; in hash_iter_next()
326 if (iter->bucket >= iter->hash->n_buckets) in hash_iter_next()