zephyr/subsys/net/lib
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
..
capture includes: prefer <zephyr/kernel.h> over <zephyr/zephyr.h> 2022-09-05 16:31:47 +02:00
coap net: lib: coap: Use coap_transmission_parameters in coap_server 2023-12-18 09:28:25 +01:00
config net: l2: ieee802154: security config 2023-09-29 16:27:31 +02:00
dns net: dns: responders: Set the multicast TTL or hoplimit 2023-12-04 15:07:43 +01:00
http net: http: define http service and resource iterable sections 2023-03-08 13:57:13 +00:00
lwm2m kernel: Introduce a way to specify minimum system heap size 2023-12-20 11:01:42 +01:00
mqtt net: mqtt: close tcp socket after websocket_disconnect 2023-06-19 09:18:45 +01:00
mqtt_sn net: mqtt-sn: Remember incoming registered topic name 2023-11-22 09:53:33 +01:00
shell net: shell: Rename the common.h to be more unique 2023-12-13 20:13:39 +01:00
sntp net: sntp: Add option for SNTP uncertainty 2023-12-08 10:25:46 +00:00
sockets net: tcp: Implement Keep-alive support 2023-12-11 10:11:10 +01:00
socks includes: prefer <zephyr/kernel.h> over <zephyr/zephyr.h> 2022-09-05 16:31:47 +02:00
tftp net: tftp: Ensure the error message fits into transmit buffer 2023-11-20 09:24:18 +01:00
tls_credentials net: tls_credentials: Add missing include dir for PSA API 2023-11-28 15:35:00 +01:00
trickle net: Move trickle files to lib 2023-12-11 10:50:35 +01:00
utils net: sntp: support building without NET_SOCKETS_POSIX_NAMES 2023-04-24 09:23:17 -04:00
websocket random: Rename random header 2023-10-10 14:23:50 +03:00
zperf net: zperf: Fix TCP packet counting 2023-11-21 08:46:45 +00:00
CMakeLists.txt net: Move trickle files to lib 2023-12-11 10:50:35 +01:00
Kconfig net: Move trickle files to lib 2023-12-11 10:50:35 +01:00