Lines Matching refs:buckets
323 int buckets; /* how many buckets, really buckets - 1*/
338 dn_ht_init(struct dn_ht *ht, int buckets, int ofs,
359 * The ht->buckets variable store the bucket size - 1 to simply
363 int b_min; /* min buckets */
364 int b_max; /* max buckets */
365 int b_ori; /* original buckets */
371 if (buckets < 1 || buckets > 65536)
374 b_ori = buckets;
376 buckets |= buckets >> 1;
377 buckets |= buckets >> 2;
378 buckets |= buckets >> 4;
379 buckets |= buckets >> 8;
380 buckets |= buckets >> 16;
382 b_max = buckets; /* Next power */
383 b_min = buckets >> 1; /* Previous power */
387 buckets = b_max;
389 buckets = b_min;
392 if (buckets <= ht->buckets) {
393 ht->buckets = buckets;
403 /* Allocate buckets + 1 entries because buckets is use to
406 l = sizeof(*ht) + (buckets + 1) * sizeof(void **);
411 ht->buckets = buckets;
458 i = (ht->buckets == 1) ? 0 :
459 (ht->hash(key, flags, arg) & ht->buckets);
501 for (i = 0; i <= ht->buckets; i++) {
537 if (*bucket > ht->buckets)