Lines Matching refs:buckets

129 /* initial number of buckets */
130 #define HASH_INITIAL_NUM_BUCKETS 32U /* initial number of buckets */
131 #define HASH_INITIAL_NUM_BUCKETS_LOG2 5U /* lg2 of initial number of buckets */
144 (head)->hh.tbl->buckets[_hd_bkt].count++; \
161 HASH_FIND_IN_BKT((head)->hh.tbl, hh, (head)->hh.tbl->buckets[ _hf_bkt ], keyptr, keylen, hashval, out); \
224 (head)->hh.tbl->buckets = (UT_hash_bucket*)uthash_malloc( \
227 if (!(head)->hh.tbl->buckets) { \
231 uthash_bzero((head)->hh.tbl->buckets, \
236 uthash_free((head)->hh.tbl->buckets, \
320 HASH_ADD_TO_BKT((head)->hh.tbl->buckets[_ha_bkt], hh, &(add)->hh, oomed); \
343 HASH_ADD_TO_BKT((head)->hh.tbl->buckets[_ha_bkt], hh, &(add)->hh, oomed); \
456 uthash_free((head)->hh.tbl->buckets, \
474 HASH_DEL_IN_BKT((head)->hh.tbl->buckets[_hd_bkt], _hd_hh_del); \
526 _thh = (head)->hh.tbl->buckets[_bkt_i].hh_head; \
538 if ((head)->hh.tbl->buckets[_bkt_i].count != _bkt_count) { \
540 (where), (head)->hh.tbl->buckets[_bkt_i].count, _bkt_count); \
803 /* Bucket expansion has the effect of doubling the number of buckets
804 * and redistributing the items into the new buckets. Ideally the
805 * items will distribute more or less evenly into the new buckets
809 * With the items distributed into more buckets, the chain length
810 * (item count) in each bucket is reduced. Thus by expanding buckets
817 * In fractions this is just n/b (n=number of items,b=new num buckets).
850 _he_thh = (tbl)->buckets[ _he_bkt_i ].hh_head; \
870 uthash_free((tbl)->buckets, (tbl)->num_buckets * sizeof(struct UT_hash_bucket)); \
873 (tbl)->buckets = _he_new_buckets; \
986 for (_src_hh = (src)->hh_src.tbl->buckets[_src_bkt].hh_head; \
1015 HASH_ADD_TO_BKT(_dst_hh->tbl->buckets[_dst_bkt], hh_dst, _dst_hh, _hs_oomed); \
1040 uthash_free((head)->hh.tbl->buckets, \
1093 UT_hash_bucket *buckets;
1099 /* in an ideal situation (all buckets used equally), no bucket would have
1100 * more than ceil(#items/#buckets) items. that's the ideal chain length. */