diff --git a/blog/content/second-edition/posts/10-heap-allocation/index.md b/blog/content/second-edition/posts/10-heap-allocation/index.md index 2e1b7a94..1f723bfa 100644 --- a/blog/content/second-edition/posts/10-heap-allocation/index.md +++ b/blog/content/second-edition/posts/10-heap-allocation/index.md @@ -423,7 +423,9 @@ pub fn init_heap( .allocate_frame() .ok_or(MapToError::FrameAllocationFailed)?; let flags = PageTableFlags::PRESENT | PageTableFlags::WRITABLE; - mapper.map_to(page, frame, flags, frame_allocator)?.flush(); + unsafe { + mapper.map_to(page, frame, flags, frame_allocator)?.flush() + }; } Ok(())