This creates a FrameAllocator from a memory map.
(memmap: &'static MemoryMap)
| 151 | { |
| 152 | // This creates a FrameAllocator from a memory map. |
| 153 | pub unsafe fn init(memmap: &'static MemoryMap) -> Self |
| 154 | { |
| 155 | BootInfoFrameAllocator |
| 156 | { |
| 157 | memmap, |
| 158 | next: 0, |
| 159 | } |
| 160 | } |
| 161 | |
| 162 | // This returns an iterator over usable frames, as specified by the memory map. |
| 163 | fn usableframes(&self) -> impl Iterator<Item = PhysFrame> |