mirror of
https://github.com/phil-opp/blog_os.git
synced 2025-12-17 06:47:49 +00:00
Add clone methods to Page(public) and Frame(private)
This commit is contained in:
@@ -29,6 +29,10 @@ impl Frame {
|
||||
fn start_address(&self) -> PhysicalAddress {
|
||||
self.number * PAGE_SIZE
|
||||
}
|
||||
|
||||
fn clone(&self) -> Frame {
|
||||
Frame { number: self.number }
|
||||
}
|
||||
}
|
||||
|
||||
pub trait FrameAllocator {
|
||||
|
||||
Reference in New Issue
Block a user