From fbaa641841a883117386d68c96989fc2dde80700 Mon Sep 17 00:00:00 2001 From: Philipp Oppermann Date: Wed, 20 May 2020 14:46:14 +0200 Subject: [PATCH] Update Heap Allocation post for x86_64 v0.11.0 --- blog/content/second-edition/posts/10-heap-allocation/index.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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(())