mirror of
https://github.com/phil-opp/blog_os.git
synced 2025-12-17 06:47:49 +00:00
Add a FrameAllocator trait
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user