zephyr/samples
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
..
application_development boards: samples: remove CONFIG_BUILD_NO_GAP_FILL=y and similar 2024-12-02 11:14:09 +01:00
arch doc: samples: Adopt code-sample-category across tree 2024-09-23 12:00:00 +02:00
basic kernel: sys_heap: stats: save heap pointers to an array during init 2025-01-23 16:37:33 +01:00
bluetooth Bluetooth: Host: Remove HCI ECC emulation 2025-01-23 10:14:46 +01:00
boards soc: esp32xx: remove unused kconfig entry 2025-01-23 13:45:31 +01:00
cpp doc: samples: Adopt code-sample-category across tree 2024-09-23 12:00:00 +02:00
drivers samples: Add MAX78000FTHR sample overlay files 2025-01-22 20:47:21 +01:00
fuel_gauge doc: samples: Adopt code-sample-category across tree 2024-09-23 12:00:00 +02:00
hello_world samples: hello_world: remove redundant title 2024-09-26 17:40:42 -04:00
kernel samples, tests: remove usage of space-separated lists 2024-12-04 14:14:53 -05:00
modules samples: modules: lvgl: transparency: Fix supported pixel format check 2025-01-16 02:39:21 +01:00
net samples: net: zperf: Add correct .conf file name for mimxrt1060_evk 2025-01-22 05:41:33 +01:00
philosophers samples: doc: convert philosophers sample to code-sample directive 2024-09-23 12:00:00 +02:00
posix samples, tests: remove usage of space-separated lists 2024-12-04 14:14:53 -05:00
psa samples|tests: secure-storage: allow all test rng sources 2024-12-19 17:53:37 +01:00
sensor samples: sensor: vl53l0x: Include private channels 2025-01-17 23:07:54 +01:00
shields samples/shields: x-nucleo-iks4a1: Add lis2dux12 accel and temp test 2024-12-27 19:34:46 +01:00
subsys samples: subsys: shell: shell_module: Incorrect help message of sub_cmd1 2025-01-22 08:08:12 +01:00
synchronization samples/synchronization: fix thread b pinning 2024-07-30 18:30:30 +01:00
sysbuild samples, tests: remove usage of space-separated lists 2024-12-04 14:14:53 -05:00
tfm_integration samples: tfm_integration: Update regression test dependencies 2025-01-20 11:43:32 +01:00
userspace samples: userspace: shared_mem: remove mimxrt700_evk cm33 cores 2025-01-14 17:56:53 +01:00
index.rst doc: samples: Adopt code-sample-category across tree 2024-09-23 12:00:00 +02:00
sample_definition_and_criteria.rst doc: overhaul sample criteria and expectations 2024-09-12 10:03:30 +02:00