Lines Matching refs:buckets

90     /* We want the number of allocated buckets to be at least twice that of the 
98 /* Allocate enough buckets for the anticipated number of entries */
99 rval = kxld_array_init(&dict->buckets, sizeof(DictEntry), num_buckets);
125 kxld_array_clear(&dict->buckets);
148 kxld_array_deinit(&dict->buckets);
177 entry = kxld_array_get_item(&dict->buckets, idx);
184 * collision, we just walk along the buckets until a free bucket shows up.
200 entry = kxld_array_get_item(&dict->buckets, idx);
204 idx = (idx + 1) % dict->buckets.nitems;
207 entry = kxld_array_get_item(&dict->buckets, idx);
210 check(idx < dict->buckets.nitems);
250 entry = kxld_array_get_item(&dict->buckets, idx);
274 u_int nbuckets = (dict->buckets.nitems * 2 + 1);
279 /* Initialize a new set of buckets to hold more entries */
283 /* Swap the new buckets with the old buckets */
284 tmparray = dict->buckets;
285 dict->buckets = dict->resize_buckets;
290 dict->resize_threshold = RESIZE_THRESHOLD(dict->buckets.nitems);
301 /* Clear the old buckets */
322 /* Iterate through the buckets until we find an EMPTY bucket, a DELETED
325 entry = kxld_array_get_item(&dict->buckets, idx);
327 idx = (idx + 1) % dict->buckets.nitems;
329 entry = kxld_array_get_item(&dict->buckets, idx);
358 entry = kxld_array_get_item(&dict->buckets, idx);
385 /* Walk over the dictionary looking for USED buckets */
386 for (; iter->idx < iter->dict->buckets.nitems; ++(iter->idx)) {
387 entry = kxld_array_get_item(&iter->dict->buckets, iter->idx);
425 return (hash_val % dict->buckets.nitems);
435 return (u_int) (key % dict->buckets.nitems);
445 return (u_int) (key % dict->buckets.nitems);