From fc33c079a1fce5b3616492c7f872eb213a96e1b8 Mon Sep 17 00:00:00 2001 From: Philipp Oppermann Date: Wed, 26 Jun 2019 18:16:03 +0200 Subject: [PATCH] The heap size is 100 KiB (not 1 KiB) --- blog/content/second-edition/posts/10-heap-allocation/index.md | 2 +- 1 file changed, 1 insertion(+), 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 c67bdaee..ce96345a 100644 --- a/blog/content/second-edition/posts/10-heap-allocation/index.md +++ b/blog/content/second-edition/posts/10-heap-allocation/index.md @@ -388,7 +388,7 @@ pub const HEAP_START: usize = 0x_4444_4444_0000; pub const HEAP_SIZE: usize = 100 * 1024; // 100 KiB ``` -We set the heap size to 1 KiB for now. If we need more space in the future, we can simply increase it. +We set the heap size to 100 KiB for now. If we need more space in the future, we can simply increase it. If we tried to use this heap region now, a page fault would occur since the virtual memory region is not mapped to physical memory yet. To resolve this, we create an `init_heap` function that maps the heap pages using the [`Mapper` API] that we introduced in the [_"Paging Implementation"_] post: