From: Alan Cox Date: Mon, 10 Sep 2018 12:54:54 +0000 (+0100) Subject: sam: allocate process space for the correct number of tasks X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=a2d58f3e4ce96bdeeb911b7352984a747ee45123;p=FUZIX.git sam: allocate process space for the correct number of tasks --- 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); }