We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I'm trying to allocate a 2MiB huge frame like this:
unsafe impl<T: PageSize> FrameAllocator<T> for GlobalFrameAllocator { fn allocate_frame(&mut self) -> Option<PhysFrame<T>> { unsafe { if let Some(addr) = BITMAP.alloc_contiguous(T::SIZE as usize / Size4KiB::SIZE as usize, 1) { let addr = PhysAddr::new(addr as u64 * Size4KiB::SIZE); PhysFrame::from_start_address(addr).ok() } else { None } } } } impl<T: PageSize> FrameDeallocator<T> for GlobalFrameAllocator { unsafe fn deallocate_frame(&mut self, frame: PhysFrame<T>) { let addr = frame.start_address().as_u64() as usize; BITMAP.dealloc(addr); } }
I'm very confused on what alloc_contiguous does
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I'm trying to allocate a 2MiB huge frame like this:
I'm very confused on what alloc_contiguous does
The text was updated successfully, but these errors were encountered: