Add a FrameAllocator trait

This commit is contained in:
Philipp Oppermann
2015-11-14 19:21:23 +01:00
parent 75988f1324
commit 8304439c82
4 changed files with 29 additions and 9 deletions

View File

@@ -14,3 +14,8 @@ impl Frame {
Frame{ number: address / PAGE_SIZE }
}
}
pub trait FrameAllocator {
fn allocate_frame(&mut self) -> Option<Frame>;
fn deallocate_frame(&mut self, frame: Frame);
}