Lines Matching refs:buckets

139 /* initial number of buckets */
140 #define HASH_INITIAL_NUM_BUCKETS 32U /* initial number of buckets */
141 #define HASH_INITIAL_NUM_BUCKETS_LOG2 5U /* lg2 of initial number of buckets */
154 (head)->hh.tbl->buckets[_hd_bkt].count++; \
171 HASH_FIND_IN_BKT((head)->hh.tbl, hh, (head)->hh.tbl->buckets[ _hf_bkt ], keyptr, keylen, hashval, out); \
234 (head)->hh.tbl->buckets = (UT_hash_bucket*)uthash_malloc( \
237 if (!(head)->hh.tbl->buckets) { \
241 uthash_bzero((head)->hh.tbl->buckets, \
246 uthash_free((head)->hh.tbl->buckets, \
330 HASH_ADD_TO_BKT((head)->hh.tbl->buckets[_ha_bkt], hh, &(add)->hh, oomed); \
353 HASH_ADD_TO_BKT((head)->hh.tbl->buckets[_ha_bkt], hh, &(add)->hh, oomed); \
466 uthash_free((head)->hh.tbl->buckets, \
484 HASH_DEL_IN_BKT((head)->hh.tbl->buckets[_hd_bkt], _hd_hh_del); \
535 _thh = (head)->hh.tbl->buckets[_bkt_i].hh_head; \
547 if ((head)->hh.tbl->buckets[_bkt_i].count != _bkt_count) { \
549 (where), (head)->hh.tbl->buckets[_bkt_i].count, _bkt_count); \
897 /* Bucket expansion has the effect of doubling the number of buckets
898 * and redistributing the items into the new buckets. Ideally the
899 * items will distribute more or less evenly into the new buckets
903 * With the items distributed into more buckets, the chain length
904 * (item count) in each bucket is reduced. Thus by expanding buckets
911 * In fractions this is just n/b (n=number of items,b=new num buckets).
944 _he_thh = (tbl)->buckets[ _he_bkt_i ].hh_head; \
964 uthash_free((tbl)->buckets, (tbl)->num_buckets * sizeof(struct UT_hash_bucket)); \
967 (tbl)->buckets = _he_new_buckets; \
1080 for (_src_hh = (src)->hh_src.tbl->buckets[_src_bkt].hh_head; \
1109 HASH_ADD_TO_BKT(_dst_hh->tbl->buckets[_dst_bkt], hh_dst, _dst_hh, _hs_oomed); \
1134 uthash_free((head)->hh.tbl->buckets, \
1187 UT_hash_bucket *buckets;
1193 /* in an ideal situation (all buckets used equally), no bucket would have
1194 * more than ceil(#items/#buckets) items. that's the ideal chain length. */