Skip to content

Commit 0230d61

Browse files
nia-eRalfJung
andcommitted
Update src/alloc/isolated_alloc.rs
Co-authored-by: Ralf Jung <post@ralfj.de>
1 parent 1926679 commit 0230d61

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/alloc/isolated_alloc.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,9 @@ impl IsolatedAlloc {
120120
if pinfo.domain_size() < idx_pinfo + size_pinfo {
121121
break;
122122
}
123-
let pred = !(idx_pinfo..idx_pinfo + size_pinfo).any(|idx| pinfo.contains(idx));
123+
// FIXME: is there a more efficient way to check whether the entire range is unset
124+
// in the bitset?
125+
let range_avail = !(idx_pinfo..idx_pinfo + size_pinfo).any(|idx| pinfo.contains(idx));
124126
if pred {
125127
pinfo.insert_range(idx_pinfo..idx_pinfo + size_pinfo);
126128
unsafe {

0 commit comments

Comments
 (0)