Skip to content

Commit e7d7d48

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

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/alloc/isolated_alloc.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,8 @@ impl IsolatedAlloc {
165165
self.dealloc_multi_page(ptr, layout);
166166
}
167167
} else {
168+
// Find the page this allocation belongs to.
169+
// This could be made faster if the list was sorted -- the allocator isn't fully optimized at the moment.
168170
let pinfo = std::iter::zip(&mut self.page_ptrs, &mut self.page_infos)
169171
.find(|(page, _)| page.addr() == page_addr);
170172
let Some((_, pinfo)) = pinfo else {

0 commit comments

Comments
 (0)