Skip insufficiently large bump alloc regions.

This commit is contained in:
4lDO2
2024-04-11 22:02:44 +02:00
parent 5e75df56c5
commit 99fcfc5fae
-3
View File
@@ -62,14 +62,11 @@ impl<A: Arch> FrameAllocator for BumpAllocator<A> {
for area in self.areas.iter() {
if offset < area.size {
if area.size - offset < count.data() * A::PAGE_SIZE {
/*
// The area may be too small for this alloc request. In that case, skip to the
// next area.
self.offset += area.size - offset;
offset = 0;
continue;
*/
return None;
}
let page_phys = area.base.add(offset);