zephyr/subsys/net/lib/lwm2m
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
..
buf_util.h net: lwm2m: Integrate JSON lib to SenML-JSON 2022-06-06 12:06:43 +02:00
CMakeLists.txt net: lwm2m: Separate opaque content format into its own 2023-09-27 15:44:30 +02:00
ipso_accelerometer.c init: remove the need for a dummy device pointer in SYS_INIT functions 2023-04-12 14:28:07 +00:00
ipso_buzzer.c net: rename shadow variables 2023-08-10 08:14:43 +00:00
ipso_current_sensor.c net: lwm2m: Initialize empty string sizes correctly on objects 2023-10-20 15:11:32 +02:00
ipso_filling_sensor.c init: remove the need for a dummy device pointer in SYS_INIT functions 2023-04-12 14:28:07 +00:00
ipso_filling_sensor.h subsystems: migrate includes to <zephyr/...> 2022-05-09 12:07:35 +02:00
ipso_generic_sensor.c net: lwm2m: Initialize empty string sizes correctly on objects 2023-10-20 15:11:32 +02:00
ipso_humidity_sensor.c net: lwm2m: Initialize empty string sizes correctly on objects 2023-10-20 15:11:32 +02:00
ipso_light_control.c net: lwm2m: Initialize empty string sizes correctly on objects 2023-10-20 15:11:32 +02:00
ipso_onoff_switch.c init: remove the need for a dummy device pointer in SYS_INIT functions 2023-04-12 14:28:07 +00:00
ipso_pressure_sensor.c net: lwm2m: Initialize empty string sizes correctly on objects 2023-10-20 15:11:32 +02:00
ipso_push_button.c init: remove the need for a dummy device pointer in SYS_INIT functions 2023-04-12 14:28:07 +00:00
ipso_temp_sensor.c net: lwm2m: Initialize empty string sizes correctly on objects 2023-10-20 15:11:32 +02:00
ipso_timer.c net: rename shadow variables 2023-08-10 08:14:43 +00:00
ipso_voltage_sensor.c net: lwm2m: Initialize empty string sizes correctly on objects 2023-10-20 15:11:32 +02:00
Kconfig net: lwm2m: device object: optionally store error list in settings 2023-12-06 17:55:22 +00:00
Kconfig.ipso net: lwm2m: Typo in LWM2M_IPSO_TIMER description 2023-03-11 08:46:22 +02:00
Kconfig.ucifi net: lib: lwm2m: add uCIFI LPWAN object 2022-12-14 09:51:38 +01:00
lwm2m_engine.c net: lwm2m: Fix pmin handling on tickless 2023-12-11 09:57:09 +01:00
lwm2m_engine.h net: lwm2m: Allow disabling server for a period of time 2023-12-05 16:40:06 -06:00
lwm2m_message_handling.c net: lib: coap: Change coap_pending_init() 2023-12-15 11:41:27 +00:00
lwm2m_message_handling.h net: lwm2m: Fix composite read on SenML-CBOR 2023-09-27 15:44:30 +02:00
lwm2m_obj_access_control.c net: lwm2m: Fix build warning on access-control object 2023-09-21 09:29:05 +02:00
lwm2m_obj_access_control.h net: lwm2m: Access control object 2022-07-15 10:10:16 +02:00
lwm2m_obj_binaryappdata.c init: remove the need for a dummy device pointer in SYS_INIT functions 2023-04-12 14:28:07 +00:00
lwm2m_obj_binaryappdata.h net: lwm2m: add binaryappdatacontainer obj support 2023-01-03 11:02:09 +01:00
lwm2m_obj_connmon.c net: lib: lwm2m: Use int16_t for signal quality 2023-11-20 13:01:23 +01:00
lwm2m_obj_device.c net: lib: lwm2m: use correct format specifier for LOG_ERR 2023-12-14 09:32:43 +01:00
lwm2m_obj_event_log.c init: remove the need for a dummy device pointer in SYS_INIT functions 2023-04-12 14:28:07 +00:00
lwm2m_obj_event_log.h net: lwm2m: Add Event Log object 2022-07-13 10:19:26 +02:00
lwm2m_obj_firmware.c net: lwm2m: Fix race condition on Firmware object 2023-08-16 13:03:07 +02:00
lwm2m_obj_firmware_pull.c net: lwm2m: Set FOTA state correctly on URI write 2022-10-11 11:13:56 +02:00
lwm2m_obj_gateway.c net: lwm2m: Initialize empty string sizes correctly on objects 2023-10-20 15:11:32 +02:00
lwm2m_obj_gateway.h net: lwm2m: Add LwM2M gateway object 2022-01-18 13:19:12 -05:00
lwm2m_obj_location.c init: remove the need for a dummy device pointer in SYS_INIT functions 2023-04-12 14:28:07 +00:00
lwm2m_obj_portfolio.c net: lwm2m: Fix overlapping buffers from Portfolio object 2023-11-02 09:28:04 +01:00
lwm2m_obj_security.c net: lwm2m: Allow finding security instance by short ID. 2023-12-05 16:40:06 -06:00
lwm2m_obj_server.c net: lwm2m: Implement fallback mechanism and support for diable 2023-12-05 16:40:06 -06:00
lwm2m_obj_server.h net: lwm2m: Allow disabling server for a period of time 2023-12-05 16:40:06 -06:00
lwm2m_obj_swmgmt.c init: remove the need for a dummy device pointer in SYS_INIT functions 2023-04-12 14:28:07 +00:00
lwm2m_object.h net: lwm2m: Properly initialize buffers for resource instance 2023-10-20 15:11:32 +02:00
lwm2m_observation.c net: lwm2m: Allow disabling server for a period of time 2023-12-05 16:40:06 -06:00
lwm2m_observation.h net: lwm2m: Reset ongoing notification in case token changes 2023-10-04 11:23:53 +02:00
lwm2m_pull_context.c include: net: http: rename http_x.h http/x.h 2022-10-12 09:02:21 -04:00
lwm2m_pull_context.h subsystems: migrate includes to <zephyr/...> 2022-05-09 12:07:35 +02:00
lwm2m_rd_client.c net: lwm2m: Implement fallback mechanism and support for diable 2023-12-05 16:40:06 -06:00
lwm2m_rd_client.h net: lwm2m: Implement fallback mechanism and support for diable 2023-12-05 16:40:06 -06:00
lwm2m_registry.c net: lwm2m: Fix core objects version reporting 2023-11-13 09:46:06 +01:00
lwm2m_registry.h net: lwm2m: Add const qualifier to many pointers 2023-02-22 14:26:20 +01:00
lwm2m_resource_ids.h net: lwm2m: Add IPSO Pressure Sensor object in ver. 1.1 2021-03-29 13:42:11 -04:00
lwm2m_rw_cbor.c net: lwm2m: LwM2M engine time API update 2022-10-24 10:39:03 +02:00
lwm2m_rw_cbor.h net: lwm2m: Single instance read&write with CBOR 2022-04-22 09:44:36 +02:00
lwm2m_rw_json.c lwm2m: fix armclang compiler warnings with is*() functions 2023-03-31 14:01:24 +02:00
lwm2m_rw_json.h net: lwm2m: remove lwm2m_engine_obj from most handlers/formatter OPs 2019-08-02 12:00:35 +03:00
lwm2m_rw_link_format.c net: lwm2m: Remove the resource type in registration message 2023-11-03 11:44:28 +01:00
lwm2m_rw_link_format.h tests: net: lwm2m: Add link-format content writer tests 2022-02-02 11:12:56 +01:00
lwm2m_rw_oma_tlv.c net: lwm2m: use path as block context retrieval 2023-05-03 10:01:37 +02:00
lwm2m_rw_oma_tlv.h tests: net: lwm2m: Add OMA TLV content writer tests 2022-02-02 11:12:56 +01:00
lwm2m_rw_opaque.c net: lwm2m: Separate opaque content format into its own 2023-09-27 15:44:30 +02:00
lwm2m_rw_opaque.h net: lwm2m: Separate opaque content format into its own 2023-09-27 15:44:30 +02:00
lwm2m_rw_plain_text.c net: lwm2m: Separate opaque content format into its own 2023-09-27 15:44:30 +02:00
lwm2m_rw_plain_text.h net: lwm2m: Allow to return error codes by content encoders/decoders 2022-02-02 11:12:56 +01:00
lwm2m_rw_senml_cbor.c net: lwm2m: Check access rights on composite operations 2023-10-20 15:12:39 +02:00
lwm2m_rw_senml_cbor.h net: lwm2m: Composite Observation refactor 2022-06-06 12:06:43 +02:00
lwm2m_rw_senml_json.c net: lwm2m: Check access rights on composite operations 2023-10-20 15:12:39 +02:00
lwm2m_rw_senml_json.h net: lwm2m: Composite Observation refactor 2022-06-06 12:06:43 +02:00
lwm2m_senml_cbor.cddl net: lwm2m: support senml cbor object link 2023-01-05 12:43:24 +01:00
lwm2m_senml_cbor.patch lwm2m_senml_cbor: Update the regenerate script and the patch file 2023-04-18 15:22:02 +02:00
lwm2m_senml_cbor_decode.c lwm2m_senml_cbor: Regenerate code files using zcbor 0.7.0 2023-04-18 15:22:02 +02:00
lwm2m_senml_cbor_decode.h lwm2m_senml_cbor: Regenerate code files using zcbor 0.7.0 2023-04-18 15:22:02 +02:00
lwm2m_senml_cbor_encode.c lwm2m_senml_cbor_encode.c: Manually edit whitespace 2023-04-18 15:22:02 +02:00
lwm2m_senml_cbor_encode.h lwm2m_senml_cbor: Regenerate code files using zcbor 0.7.0 2023-04-18 15:22:02 +02:00
lwm2m_senml_cbor_regenerate.sh lwm2m_senml_cbor: Update the regenerate script and the patch file 2023-04-18 15:22:02 +02:00
lwm2m_senml_cbor_types.h net: lwm2m: ignore -Wshadow for cbor type header file 2023-08-22 11:39:58 +02:00
lwm2m_shell.c kernel: Introduce a way to specify minimum system heap size 2023-12-20 11:01:42 +01:00
lwm2m_util.c net: lwm2m: Move utility functions from engine 2023-04-12 17:44:37 +02:00
lwm2m_util.h net: lwm2m: Move utility functions from engine 2023-04-12 17:44:37 +02:00
README_lwm2m west.yml: Update zcbor to v. 0.5.1 2022-07-04 15:13:42 +02:00
ucifi_battery.c init: remove the need for a dummy device pointer in SYS_INIT functions 2023-04-12 14:28:07 +00:00
ucifi_battery.h net: lwm2m: add uCIFI Battery object (3411) 2022-01-21 11:32:08 -05:00
ucifi_lpwan.c net: lwm2m: Initialize empty string sizes correctly on objects 2023-10-20 15:11:32 +02:00
ucifi_lpwan.h net: lib: lwm2m: add uCIFI LPWAN object 2022-12-14 09:51:38 +01:00