Make kernel heap for processes optional and fully configurable from the wizard.
authorarighi <arighi@38d2e660-2303-0410-9eaa-f027e97ec537>
Wed, 17 Mar 2010 11:53:07 +0000 (11:53 +0000)
committerarighi <arighi@38d2e660-2303-0410-9eaa-f027e97ec537>
Wed, 17 Mar 2010 11:53:07 +0000 (11:53 +0000)
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@3219 38d2e660-2303-0410-9eaa-f027e97ec537

bertos/cfg/cfg_proc.h
bertos/kern/proc.c

index 1cd5a191a10de59d5c7f4aad1019d9d0b15c453a..97985a991e819dcdbbf8351b39903fd7f37e996e 100644 (file)
 
 /**
  * Dynamic memory allocation for processes.
- *
  * $WIZ$ type = "boolean"
- * $WIZ$ supports = "False"
+ * $WIZ$ conditional_deps = "heap"
  */
 #define CONFIG_KERN_HEAP 0
 
+/**
+ * Size of the dynamic memory pool used by processes.
+ * $WIZ$ type = "int"
+ * $WIZ$ min = 0
+ */
+#define CONFIG_KERN_HEAP_SIZE 8192L
+
 /**
  * Preemptive process scheduling.
  *
@@ -80,7 +86,6 @@
  *
  * $WIZ$ type = "int"
  * $WIZ$ min = 1
- * $WIZ$ supports = "False"
  */
 #define CONFIG_KERN_QUANTUM 47
 
index 18c89599eb689dcce8344ef5be7a9af626f669d2..713c457f9c701820cf8d32a26e11d9d719b926db 100644 (file)
@@ -85,7 +85,7 @@ static struct Process main_process;
 /**
  * Local heap dedicated to allocate the memory used by the processes.
  */
-static HEAP_DEFINE_BUF(heap_buf, KERN_MINSTACKSIZE * 128);
+static HEAP_DEFINE_BUF(heap_buf, CONFIG_KERN_HEAP_SIZE);
 static Heap proc_heap;
 
 /*