This is an automated email from the ASF dual-hosted git repository.

aguettouche pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit 086b09cc84c8bedd1c6e387c8b1f851667c331d5
Author: Xiang Xiao <xiaoxi...@xiaomi.com>
AuthorDate: Sun Nov 7 23:00:01 2021 +0800

    sched: Reduce the default preallocated buffer when DEFAULT_SMALL=y
    
    Signed-off-by: Xiang Xiao <xiaoxi...@xiaomi.com>
---
 sched/Kconfig | 18 ++++++++++++------
 1 file changed, 12 insertions(+), 6 deletions(-)

diff --git a/sched/Kconfig b/sched/Kconfig
index 1a2af8d..69b1992 100644
--- a/sched/Kconfig
+++ b/sched/Kconfig
@@ -219,7 +219,8 @@ config START_DAY
 
 config PREALLOC_TIMERS
        int "Number of pre-allocated POSIX timers"
-       default 8
+       default 4 if DEFAULT_SMALL
+       default 8 if !DEFAULT_SMALL
        ---help---
                The number of pre-allocated POSIX timer structures.  The system 
manages a
                pool of preallocated timer structures to minimize dynamic 
allocations.  Set to
@@ -250,7 +251,8 @@ if IRQCHAIN
 
 config PREALLOC_IRQCHAIN
        int "Number of pre-allocated irq chains"
-       default 8
+       default 4 if DEFAULT_SMALL
+       default 8 if !DEFAULT_SMALL
        ---help---
                The number of pre-allocated irq chain structures.  The system 
manages
                a pool of preallocated irq chain structures to minimize dynamic
@@ -1154,7 +1156,8 @@ if PRIORITY_INHERITANCE
 
 config SEM_PREALLOCHOLDERS
        int "Number of pre-allocated holders"
-       default 16
+       default 4 if DEFAULT_SMALL
+       default 8 if !DEFAULT_SMALL
        ---help---
                This setting is only used if priority inheritance is enabled.
                It defines the maximum number of different threads (minus one) 
that
@@ -1348,7 +1351,8 @@ menu "Signal Configuration"
 
 config SIG_PREALLOC_IRQ_ACTIONS
        int "Number of pre-allocated irq actions"
-       default 8
+       default 4 if DEFAULT_SMALL
+       default 8 if !DEFAULT_SMALL
        ---help---
                The number of pre-allocated irq action structures.
 
@@ -1575,14 +1579,16 @@ menu "POSIX Message Queue Options"
 
 config PREALLOC_MQ_MSGS
        int "Number of pre-allocated messages"
-       default 4
+       default 4 if DEFAULT_SMALL
+       default 8 if !DEFAULT_SMALL
        ---help---
                The number of pre-allocated message structures.  The system 
manages
                a pool of preallocated message structures to minimize dynamic 
allocations
 
 config PREALLOC_MQ_IRQ_MSGS
        int "Number of pre-allocated irq messages"
-       default 8
+       default 4 if DEFAULT_SMALL
+       default 8 if !DEFAULT_SMALL
        ---help---
                The number of pre-allocated irq message structures.
 

Reply via email to