Lines Matching refs:buckets
104 /* initial number of buckets */
105 #define HASH_INITIAL_NUM_BUCKETS 32U /* initial number of buckets */
106 #define HASH_INITIAL_NUM_BUCKETS_LOG2 5U /* lg2 of initial number of buckets */
126 HASH_FIND_IN_BKT((head)->hh.tbl, hh, (head)->hh.tbl->buckets[ _hf_bkt ], keyptr, keylen, hashval, out); \
182 (head)->hh.tbl->buckets = (UT_hash_bucket*)uthash_malloc( \
184 if (! (head)->hh.tbl->buckets) { uthash_fatal( "out of memory"); } \
185 memset((head)->hh.tbl->buckets, 0, \
265 HASH_ADD_TO_BKT((head)->hh.tbl->buckets[_ha_bkt], &(add)->hh); \
301 HASH_ADD_TO_BKT((head)->hh.tbl->buckets[_ha_bkt], &(add)->hh); \
341 uthash_free((head)->hh.tbl->buckets, \
366 HASH_DEL_IN_BKT(hh,(head)->hh.tbl->buckets[_hd_bkt], _hd_hh_del); \
410 _thh = (head)->hh.tbl->buckets[_bkt_i].hh_head; \
422 if ((head)->hh.tbl->buckets[_bkt_i].count != _bkt_count) { \
424 (head)->hh.tbl->buckets[_bkt_i].count, _bkt_count); \
762 /* Bucket expansion has the effect of doubling the number of buckets
763 * and redistributing the items into the new buckets. Ideally the
764 * items will distribute more or less evenly into the new buckets
768 * With the items distributed into more buckets, the chain length
769 * (item count) in each bucket is reduced. Thus by expanding buckets
776 * In fractions this is just n/b (n=number of items,b=new num buckets).
808 _he_thh = tbl->buckets[ _he_bkt_i ].hh_head; \
826 uthash_free( tbl->buckets, tbl->num_buckets*sizeof(struct UT_hash_bucket) ); \
829 tbl->buckets = _he_new_buckets; \
944 for(_src_hh = (src)->hh_src.tbl->buckets[_src_bkt].hh_head; \
963 HASH_ADD_TO_BKT(_dst_hh->tbl->buckets[_dst_bkt],_dst_hh); \
977 uthash_free((head)->hh.tbl->buckets, \
1031 UT_hash_bucket *buckets;
1037 /* in an ideal situation (all buckets used equally), no bucket would have
1038 * more than ceil(#items/#buckets) items. that's the ideal chain length. */