Fix: next_free_frame must be increased to the start of the current area

This commit is contained in:
Philipp Oppermann
2015-11-15 02:52:02 +01:00
parent 6ce34f5e2b
commit a8580ad3a2
2 changed files with 16 additions and 0 deletions

View File

@@ -38,6 +38,13 @@ impl AreaFrameAllocator {
let address = area.base_addr + area.length - 1;
Frame::containing_address(address as usize) >= self.next_free_frame
}).min_by(|area| area.base_addr);
if let Some(area) = self.current_area {
let start_frame = Frame::containing_address(area.base_addr as usize);
if self.next_free_frame < start_frame {
self.next_free_frame = start_frame;
}
}
}
}