malloc: Add 'malloc' command with 'info' subcommand

Add a command to display malloc heap statistics, showing total heap
size and memory currently in use.

Co-developed-by: Claude <noreply@anthropic.com>
Signed-off-by: Simon Glass <simon.glass@canonical.com>
This commit is contained in:
Simon Glass
2025-11-28 08:54:29 -07:00
parent bd0f9a753c
commit cfbee94582
7 changed files with 121 additions and 0 deletions

View File

@@ -3018,6 +3018,15 @@ config CMD_LOG
maximum log level for emitting of records). It also provides access
to a command used for testing the log system.
config CMD_MALLOC
bool "malloc - Show malloc statistics"
depends on MALLOC_DEBUG
default y
help
This provides access to malloc information. It shows statistics
about memory allocation, such as total memory allocated and
currently in use.
config CMD_MOUSE
bool "mouse - Show mouse input"
default y if MOUSE