diff --git a/kernel/Kconfig b/kernel/Kconfig index 3b916aba062..a01f40551e1 100644 --- a/kernel/Kconfig +++ b/kernel/Kconfig @@ -835,8 +835,7 @@ if KERNEL_MEM_POOL config HEAP_MEM_POOL_SIZE int "Heap memory pool size (in bytes)" - default 0 if !POSIX_MQUEUE - default 1024 if POSIX_MQUEUE + default 0 help This option specifies the size of the heap memory pool used when dynamically allocating memory using k_malloc(). The maximum size of diff --git a/lib/posix/Kconfig.mqueue b/lib/posix/Kconfig.mqueue index 58e04d21faf..7c49aee6c21 100644 --- a/lib/posix/Kconfig.mqueue +++ b/lib/posix/Kconfig.mqueue @@ -30,4 +30,7 @@ config MQUEUE_NAMELEN_MAX help Mention length of message queue name in number of characters. +config HEAP_MEM_POOL_ADD_SIZE_MQUEUE + def_int 1024 + endif