From a2d58f3e4ce96bdeeb911b7352984a747ee45123 Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Mon, 10 Sep 2018 13:54:54 +0100 Subject: [PATCH] sam: allocate process space for the correct number of tasks --- Kernel/platform-sam/discard.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Kernel/platform-sam/discard.c b/Kernel/platform-sam/discard.c index 6254053b..64e58b55 100644 --- a/Kernel/platform-sam/discard.c +++ b/Kernel/platform-sam/discard.c @@ -10,11 +10,14 @@ void map_init(void) { } -uint8_t maxpages = 16; /* 256K */ /* Pages 0/1/2/3 are the kernel 4/5 are display and fonts */ void pagemap_init(void) { + uint8_t maxpages; uint8_t i; + + maxpages = ramsize / 16; + for (i = 6; i < maxpages; i += 2) pagemap_add(i); } -- 2.34.1