Lines Matching refs:buckets

87 /* initial number of buckets */
88 #define HASH_INITIAL_NUM_BUCKETS 32 /* initial number of buckets */
89 #define HASH_INITIAL_NUM_BUCKETS_LOG2 5 /* lg2 of initial number of buckets */
102 HASH_FIND_IN_BKT((head)->hh.tbl, hh, (head)->hh.tbl->buckets[ _hf_bkt ], \
152 (head)->hh.tbl->buckets = (UT_hash_bucket*)uthash_malloc( \
154 if (! (head)->hh.tbl->buckets) { uthash_fatal( "out of memory"); } \
155 memset((head)->hh.tbl->buckets, 0, \
193 HASH_ADD_TO_BKT((head)->hh.tbl->buckets[_ha_bkt],&(add)->hh); \
221 uthash_free((head)->hh.tbl->buckets, \
245 HASH_DEL_IN_BKT(hh,(head)->hh.tbl->buckets[_hd_bkt], _hd_hh_del); \
289 _thh = (head)->hh.tbl->buckets[_bkt_i].hh_head; \
301 if ((head)->hh.tbl->buckets[_bkt_i].count != _bkt_count) { \
303 (head)->hh.tbl->buckets[_bkt_i].count, _bkt_count); \
409 /* Bucket expansion has the effect of doubling the number of buckets
410 * and redistributing the items into the new buckets. Ideally the
411 * items will distribute more or less evenly into the new buckets
415 * With the items distributed into more buckets, the chain length
416 * (item count) in each bucket is reduced. Thus by expanding buckets
423 * In fractions this is just n/b (n=number of items,b=new num buckets).
455 _he_thh = tbl->buckets[ _he_bkt_i ].hh_head; \
473 uthash_free( tbl->buckets, tbl->num_buckets*sizeof(struct UT_hash_bucket) ); \
476 tbl->buckets = _he_new_buckets; \
591 for(_src_hh = (src)->hh_src.tbl->buckets[_src_bkt].hh_head; \
610 HASH_ADD_TO_BKT(_dst_hh->tbl->buckets[_dst_bkt],_dst_hh); \
624 uthash_free((head)->hh.tbl->buckets, \
677 UT_hash_bucket *buckets;
683 /* in an ideal situation (all buckets used equally), no bucket would have
684 * more than ceil(#items/#buckets) items. that's the ideal chain length. */