sam: allocate process space for the correct number of tasks
authorAlan Cox <alan@linux.intel.com>
Mon, 10 Sep 2018 12:54:54 +0000 (13:54 +0100)
committerAlan Cox <alan@linux.intel.com>
Mon, 10 Sep 2018 12:54:54 +0000 (13:54 +0100)
Kernel/platform-sam/discard.c

index 6254053..64e58b5 100644 (file)
@@ -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);
 }