zephyr/subsys/shell
Johan Hedberg 3fbf12487c kernel: Introduce a way to specify minimum system heap size
There are several subsystems and boards which require a relatively large
system heap (used by k_malloc()) to function properly. This became even
more notable with the recent introduction of the ACPICA library, which
causes ACPI-using boards to require a system heap of up to several
megabytes in size.

Until now, subsystems and boards have tried to solve this by having
Kconfig overlays which modify the default value of HEAP_MEM_POOL_SIZE.
This works ok, except when applications start explicitly setting values
in their prj.conf files:

$ git grep CONFIG_HEAP_MEM_POOL_SIZE= tests samples|wc -l
     157

The vast majority of values set by current sample or test applications
is much too small for subsystems like ACPI, which results in the
application not being able to run on such boards.

To solve this situation, we introduce support for subsystems to specify
their own custom system heap size requirement. Subsystems do
this by defining Kconfig options with the prefix HEAP_MEM_POOL_ADD_SIZE_.
The final value of the system heap is the sum of the custom
minimum requirements, or the value existing HEAP_MEM_POOL_SIZE option,
whichever is greater.

We also introduce a new HEAP_MEM_POOL_IGNORE_MIN Kconfig option which
applications can use to force a lower value than what subsystems have
specficied, however this behavior is disabled by default.

Whenever the minimum is greater than the requested value a CMake warning
will be issued in the build output.

This patch ends up modifying several places outside of kernel code,
since the presence of the system heap is no longer detected using a
non-zero CONFIG_HEAP_MEM_POOL_SIZE value, rather it's now detected using
a new K_HEAP_MEM_POOL_SIZE value that's evaluated at build.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2023-12-20 11:01:42 +01:00
..
backends shell: telnet: Don't close the connection on EAGAIN error 2023-12-12 10:57:49 +01:00
modules kernel: Introduce a way to specify minimum system heap size 2023-12-20 11:01:42 +01:00
CMakeLists.txt lib: getopt: rework and extend getopt library 2022-01-06 21:26:59 +01:00
Kconfig shell: make ascii filtering optional 2023-08-29 19:22:16 +03:00
Kconfig.template.shell_log_queue_size shell: shell_log_backend: take buffer size from config 2022-11-22 13:05:29 +09:00
Kconfig.template.shell_log_queue_timeout
shell_cmds.c shell: fix shell instance name typo 2023-12-05 10:44:56 -05:00
shell_fprintf.c shell: fix MISRA 5.7 violations on struct shell 2023-04-14 12:21:08 +02:00
shell_help.c shell: fix MISRA 5.7 violations on struct shell 2023-04-14 12:21:08 +02:00
shell_help.h shell: fix MISRA 5.7 violations on struct shell 2023-04-14 12:21:08 +02:00
shell_history.c subsystems: migrate includes to <zephyr/...> 2022-05-09 12:07:35 +02:00
shell_log_backend.c shell: fix a memory corruption coverity issue 2023-10-13 13:11:28 +03:00
shell_ops.c shell: Fix scrolling long commands in history 2023-09-13 16:26:02 +02:00
shell_ops.h Shell: Edit shell to store/retrieve return values 2023-05-02 16:52:21 +02:00
shell_utils.c shell: correct z_shell_spaces_trim when len equal to zero 2023-12-12 15:02:58 +01:00
shell_utils.h shell: fix MISRA 5.7 violations on struct shell 2023-04-14 12:21:08 +02:00
shell_vt100.h shell: rework vt100 commands storage 2021-09-28 20:02:01 -04:00
shell_wildcard.c shell: fix MISRA 5.7 violations on struct shell 2023-04-14 12:21:08 +02:00
shell_wildcard.h shell: fix MISRA 5.7 violations on struct shell 2023-04-14 12:21:08 +02:00
shell.c shell: add new APIs to get the backend instances 2023-10-25 09:57:29 +02:00