fix bloom bitvecjournal storage allocation (#6390)
This commit is contained in:
parent
15c3233376
commit
622632616c
@ -37,9 +37,9 @@ struct BitVecJournal {
|
||||
|
||||
impl BitVecJournal {
|
||||
pub fn new(size: usize) -> BitVecJournal {
|
||||
let extra = if size % 8 > 0 { 1 } else { 0 };
|
||||
let extra = if size % 64 > 0 { 1 } else { 0 };
|
||||
BitVecJournal {
|
||||
elems: vec![0u64; size / 8 + extra],
|
||||
elems: vec![0u64; size / 64 + extra],
|
||||
journal: HashSet::new(),
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user