Skip to content
Snippets Groups Projects
Commit 98a79ec8 authored by Eemeli Lehtonen's avatar Eemeli Lehtonen
Browse files

more conherent lazy static structure

parent f590079e
No related branches found
No related tags found
No related merge requests found
......@@ -19,6 +19,8 @@ use x86_64::{align_up, PhysAddr, VirtAddr};
//
pub static PFA: Lazy<PageFrameAllocator> = Lazy::new(PageFrameAllocator::init);
const PAGE_SIZE: u64 = 2u64.pow(12); // 4KiB pages
//
......@@ -43,7 +45,6 @@ pub struct PageFrame {
impl PageFrameAllocator {
pub fn get() -> &'static PageFrameAllocator {
static PFA: Lazy<PageFrameAllocator> = Lazy::new(PageFrameAllocator::init);
&PFA
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment