Create a FrameAllocator from the passed memory map. This function is unsafe because the caller must guarantee that the passed memory map is valid. The main requirement is that all frames that are marked as `USABLE` in it are really unused.
(memory_map: &'static MemoryRegions)
| 56 | /// memory map is valid. The main requirement is that all frames that are marked |
| 57 | /// as `USABLE` in it are really unused. |
| 58 | pub unsafe fn init(memory_map: &'static MemoryRegions) -> Self { |
| 59 | BootInfoFrameAllocator { |
| 60 | memory_map, |
| 61 | next: 1, |
| 62 | buf: ArrayVec::new(), |
| 63 | } |
| 64 | } |
| 65 | |
| 66 | /// Returns an iterator over the usable frames specified in the memory map. |
| 67 | fn usable_frames(&self) -> impl Iterator<Item = PhysFrame> { |
nothing calls this directly
no outgoing calls
no test coverage detected