mirror of
https://github.com/phil-opp/blog_os.git
synced 2025-12-17 06:47:49 +00:00
Create basic paging module
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
pub use self::area_frame_allocator::AreaFrameAllocator;
|
||||
|
||||
mod area_frame_allocator;
|
||||
mod paging;
|
||||
|
||||
pub const PAGE_SIZE: usize = 4096;
|
||||
|
||||
@@ -11,7 +12,7 @@ pub struct Frame {
|
||||
|
||||
impl Frame {
|
||||
fn containing_address(address: usize) -> Frame {
|
||||
Frame{ number: address / PAGE_SIZE }
|
||||
Frame { number: address / PAGE_SIZE }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user