zephyr/lib
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
..
acpi lib: acpi: update shell and test app with the modifed resource struct 2024-02-15 12:28:55 +01:00
cpp cmake: set minimal C++ linker properties in minimal C++ CMake impl 2024-11-16 15:28:20 -05:00
crc lib: crc: add crc8_rohc for CRC-8/ROHC variant calculation 2024-10-09 09:48:00 +02:00
hash lib: hash: use new c++ Kconfig symbols 2023-07-26 14:53:51 +02:00
heap kernel: sys_heap: stats: save heap pointers to an array during init 2025-01-23 16:37:33 +01:00
libc Revert "arch: deprecate _current" 2025-01-10 07:49:08 +01:00
mem_blocks lib: mem_block: move to own folder 2023-12-13 17:27:54 -05:00
net_buf net: buf: revert disallowing blocking in syswq 2025-01-23 10:14:59 +01:00
open-amp openamp: resource table: fixes resource table for ram_console section 2024-11-08 15:55:11 -06:00
os Revert "arch: deprecate _current" 2025-01-10 07:49:08 +01:00
posix posix: options: shm: use truncation flag that has been added 2025-01-23 00:12:58 +01:00
runtime llvm: Add support for selecting runtime library 2023-08-03 19:35:11 +02:00
smf lib: smf: use while (true) in get_child_of for better clarity 2024-07-01 16:08:05 -04:00
utils json: support parsing and serializing 'uint64_t' 2024-10-05 14:04:48 -04:00
CMakeLists.txt lib: net_buf: move the network buffer implementation to lib 2024-09-07 11:19:05 -05:00
Kconfig lib: net_buf: move the network buffer implementation to lib 2024-09-07 11:19:05 -05:00