From 8203999c6575e646b16363b40eaca03c6ea4f447 Mon Sep 17 00:00:00 2001 From: arighi Date: Wed, 17 Mar 2010 11:53:07 +0000 Subject: [PATCH] Make kernel heap for processes optional and fully configurable from the wizard. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@3219 38d2e660-2303-0410-9eaa-f027e97ec537 --- bertos/cfg/cfg_proc.h | 11 ++++++++--- bertos/kern/proc.c | 2 +- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/bertos/cfg/cfg_proc.h b/bertos/cfg/cfg_proc.h index 1cd5a191..97985a99 100644 --- a/bertos/cfg/cfg_proc.h +++ b/bertos/cfg/cfg_proc.h @@ -55,12 +55,18 @@ /** * 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 diff --git a/bertos/kern/proc.c b/bertos/kern/proc.c index 18c89599..713c457f 100644 --- a/bertos/kern/proc.c +++ b/bertos/kern/proc.c @@ -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; /* -- 2.25.1