From 6db5ad78ab2f8a10e23e5e22639eddb03fb39232 Mon Sep 17 00:00:00 2001 From: Philipp Oppermann Date: Mon, 13 May 2019 12:30:13 +0200 Subject: [PATCH] Add missing MemoryMap and MemoryRegionType imports --- .../second-edition/posts/09-paging-implementation/index.md | 4 ++++ 1 file changed, 4 insertions(+) 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 6587f438..a35dcf30 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 {