diff --git a/src/memory.rs b/src/memory.rs index 1e9dd9bf..6bd52009 100644 --- a/src/memory.rs +++ b/src/memory.rs @@ -63,3 +63,19 @@ impl FrameAllocator for EmptyFrameAllocator { None } } + +pub struct BootInfoFrameAllocator +where + I: Iterator, +{ + frames: I, +} + +impl FrameAllocator for BootInfoFrameAllocator +where + I: Iterator, +{ + fn allocate_frame(&mut self) -> Option { + self.frames.next() + } +}