diff --git a/blog/content/second-edition/posts/09-paging-implementation/index.md b/blog/content/second-edition/posts/09-paging-implementation/index.md index 6587f4381..a35dcf305 100644 --- a/blog/content/second-edition/posts/09-paging-implementation/index.md +++ b/blog/content/second-edition/posts/09-paging-implementation/index.md @@ -852,6 +852,8 @@ In order to create new page tables, we need to create a proper frame allocator. ```rust // in src/memory.rs +use bootloader::bootinfo::MemoryMap; + /// A FrameAllocator that returns usable frames from the bootloader's memory map. pub struct BootInfoFrameAllocator { memory_map: &'static MemoryMap, @@ -886,6 +888,8 @@ Before we implement the `FrameAllocator` trait, we add an auxiliary method that ```rust // in src/memory.rs +use bootloader::bootinfo::MemoryRegionType; + impl BootInfoFrameAllocator { /// Returns an iterator over the usable frames specified in the memory map. fn usable_frames(&self) -> impl Iterator {