zephyr/samples/basic
Ivan Pankratov 257d9d45ba kernel: sys_heap: stats: save heap pointers to an array during init
To request heap statistics, a pointer to a heap structure is required.
This is straightforward for a user-defined heap. However, such a pointer
is not known for heaps created by other components or libraries, like
libc. Therefore, it is not possible to calculate the total heap memory.

The proposed solution is to use an array of pointers, which is filled in
on every sys_heap_init() call. One can then iterate through it to sum up
the total memory allocated for all heaps.

The array size is configurable. The default array size is zero,
which means the feature is disabled. Any other integer greater then zero
defines the array size and enables the feature.

A list of pointers instead of an array could be another approach,
but it requeres a heap, which is not always available.

Signed-off-by: Ivan Pankratov <ivan.pankratov@silabs.com>
2025-01-23 16:37:33 +01:00
..
blinky samples: blinky: add verbose printf output 2023-12-15 11:20:03 +00:00
blinky_pwm samples: pwm: Add overlay for nucleo_l4r5zi board 2024-12-17 09:48:40 +01:00
button drivers: gpio: Add support for RZ/G3S 2024-12-12 11:12:22 +01:00
custom_dts_binding everywhere: reindent .overlay files with tabs 2024-06-26 15:59:44 +02:00
fade_led driver: pwm: infineon: cyw920829m2evk_02 pwm 2024-10-26 03:57:41 +01:00
hash_map convert: use k_uptime_seconds 2024-05-14 09:32:01 +02:00
minimal tests: add integration_platforms and misc optimizations 2024-11-26 00:12:07 +01:00
rgb_led drivers: pwm: mcux_ftm: allow to select clock source 2024-04-19 10:08:53 +02:00
servo_motor boards: bbc: adopt new zephyr:board directive and role 2024-10-24 17:51:15 +02:00
sys_heap kernel: sys_heap: stats: save heap pointers to an array during init 2025-01-23 16:37:33 +01:00
threads zephyr: bulk update to DT_NODE_HAS_STATUS_OKAY 2024-10-03 17:06:52 +01:00
basic.rst doc: samples: Adopt code-sample-category across tree 2024-09-23 12:00:00 +02:00