[bitset] When reopening a bitset some bits could be lost at the far end.

The number of words necessary to store the bits was being miscalculated.
This commit is contained in:
Joe Thornber 2014-09-01 14:17:44 +01:00
parent 14cfcf2dfd
commit 93468190bd

View File

@ -40,7 +40,7 @@ namespace persistent_data {
bitset_impl(transaction_manager &tm, block_address root, unsigned nr_bits) bitset_impl(transaction_manager &tm, block_address root, unsigned nr_bits)
: nr_bits_(nr_bits), : nr_bits_(nr_bits),
array_(tm, rc_, root, nr_bits / BITS_PER_ULL) { array_(tm, rc_, root, div_up<unsigned>(nr_bits, BITS_PER_ULL)) {
} }
block_address get_root() const { block_address get_root() const {