|
@@ -57,20 +57,17 @@ void bibop_free(raw_block_header_t *raw_block, void *ptr) {
|
|
|
|
|
|
// If the sum of the starting position and the cells that are used is more
|
|
|
// than the available bits of one bitmap array element, then we have to
|
|
|
- // modify two elements.
|
|
|
+ // modify the next element as well.
|
|
|
if(start_pos + cells_used <= BMAP_EL_SIZE_BITS) {
|
|
|
mask1 = make_bit_mask(start_pos + 1, cells_used);
|
|
|
-
|
|
|
- rb_header->bmap_array[bmap_index] |= mask1;
|
|
|
-
|
|
|
} else {
|
|
|
mask1 = make_bit_mask(start_pos + 1, BMAP_EL_SIZE_BITS - start_pos);
|
|
|
mask2 = make_bit_mask((size_t) 1,
|
|
|
start_pos + cells_used - BMAP_EL_SIZE_BITS);
|
|
|
|
|
|
- rb_header->bmap_array[bmap_index] |= mask1;
|
|
|
rb_header->bmap_array[bmap_index + 1] |= mask2;
|
|
|
}
|
|
|
+ rb_header->bmap_array[bmap_index] |= mask1;
|
|
|
|
|
|
#ifdef HAVE_LOCKS
|
|
|
pthread_mutex_unlock(&raw_block->mutex);
|