zephyr/subsys/net
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
..
conn_mgr net: fix thread function signatures 2023-10-30 12:24:34 +01:00
ip net: ipv6_mld: Silently drop MLDv1 queries 2023-12-18 09:28:42 +01:00
l2 Revert "net: gptp: Fix announce message len" 2023-12-19 22:51:52 +00:00
lib kernel: Introduce a way to specify minimum system heap size 2023-12-20 11:01:42 +01:00
pkt_filter
CMakeLists.txt net: conn_mgr: Write documentation 2023-09-28 15:11:14 +02:00
Kconfig net: Add Kconfig for net buf alignment 2023-12-14 09:29:47 +01:00
Kconfig.hostname
Kconfig.template.log_config.default.net
Kconfig.template.log_config.net
buf.c kernel: Introduce a way to specify minimum system heap size 2023-12-20 11:01:42 +01:00
buf_simple.c
hostname.c net: hostname: trigger an event when the hostname changes 2023-11-29 13:16:16 -06:00