Add pointed_frame and set methods to Entry

This commit is contained in:
Philipp Oppermann
2017-04-13 18:30:27 +02:00
parent 148d506629
commit fe464463eb
2 changed files with 20 additions and 0 deletions

View File

@@ -1,4 +1,5 @@
pub use self::area_frame_allocator::AreaFrameAllocator;
use self::paging::PhysicalAddress;
mod area_frame_allocator;
mod paging;
@@ -14,6 +15,10 @@ impl Frame {
fn containing_address(address: usize) -> Frame {
Frame{ number: address / PAGE_SIZE }
}
fn start_address(&self) -> PhysicalAddress {
self.number * PAGE_SIZE
}
}
pub trait FrameAllocator {