Skip to content

Commit

Permalink
fix small bug
Browse files Browse the repository at this point in the history
  • Loading branch information
pzittlau committed Mar 7, 2025
1 parent 0b95217 commit ebff5ac
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions betree/src/allocator/hybrid_allocator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ struct Pool {

impl Pool {
fn new(section_size: usize, elements: usize) -> Self {
let bytes = (elements + 7) / 8;
Pool {
bitmap: BitVec::with_capacity(elements), // Initialize with capacity for performance
last_offset: 0,
Expand Down Expand Up @@ -235,7 +234,7 @@ impl Allocator for HybridAllocator {
let pool_section_end =
min(pool_section_size + pool_section_offset, pool.bitmap.len());

pool.bitmap[pool_section_offset..pool_section_size].fill(true);
pool.bitmap[pool_section_offset..pool_section_end].fill(true);
}
}

Expand Down

0 comments on commit ebff5ac

Please sign in to comment.