Lines Matching refs:bucket

23     uint bucket;
58 DEBUG_ASSERT(block->bucket < state->bucket_count);
60 DEBUG_ASSERT(!(block->start & ((1u << block->bucket) - 1)));
62 /* Return the block to its proper free bucket, sorted by base ID. Start by
64 struct list_node* l = &state->free_block_buckets[block->bucket];
66 uint block_len = 1u << block->bucket;
70 __UNUSED uint after_len = 1u << after->bucket;
87 /* Don't merge blocks in the largest bucket. */
88 if (block->bucket + 1 == state->bucket_count)
106 uint first_len = 1u << first->bucket;
112 DEBUG_ASSERT(first->bucket == second->bucket);
114 /* Remove the two blocks' bookkeeping from their bucket */
122 * it in the next bucket size up. */
123 first->bucket++;
143 TRACEF("Failed to allocate storage for %u free bucket lists!\n", state->bucket_count);
226 uint bucket = state->bucket_count - 1;
227 uint csize = (1u << bucket);
235 bucket--;
246 bucket++;
249 DEBUG_ASSERT(bucket < state->bucket_count);
254 DEBUG_ASSERT((1u << bucket) == csize);
255 DEBUG_ASSERT(bucket < state->bucket_count);
269 block->bucket = bucket;
298 uint bucket = orig_bucket;
299 if (bucket >= state->bucket_count) {
312 while (bucket < state->bucket_count) {
313 block = list_remove_head_type(&state->free_block_buckets[bucket], p2ra_block_t, node);
316 bucket++;
326 DEBUG_ASSERT(block->bucket == bucket);
327 DEBUG_ASSERT(bucket >= orig_bucket);
329 while (bucket > orig_bucket) {
342 DEBUG_ASSERT(bucket);
343 bucket--;
346 block->bucket = bucket;
349 split_block->start = block->start + (1u << block->bucket);
350 split_block->bucket = bucket;
367 uint bucket = log2_uint_floor(size);
373 * bucket. Because this is an O(n) operation, and serves only as a sanity
381 if ((block->start == range_start) && (block->bucket == bucket)) {
392 block->bucket = bucket;