This is an automated email from the ASF dual-hosted git repository. xiaoxiang781216 pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit 1aab52925a76c2a26b1b200ae5873ee59ee5c8fd Author: Marco Casaroli <[email protected]> AuthorDate: Thu Oct 29 22:20:32 2026 +0100 Documentation/mm: Describe the growth of a process heap. The heap of a process in the kernel build grows with sbrk() when it has no free chunk that is large enough. Say that this is a normal step that the heap does not report, that the warning and the panic on a failed allocation come only when sbrk() fails, and that the heap dump applies only to the kernel heap. Assisted-by: Claude Code:claude-opus-5-5 Signed-off-by: Marco Casaroli <[email protected]> --- Documentation/os/memory/memory_configurations.rst | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Documentation/os/memory/memory_configurations.rst b/Documentation/os/memory/memory_configurations.rst index 93ec3677755..3c38cb716a6 100644 --- a/Documentation/os/memory/memory_configurations.rst +++ b/Documentation/os/memory/memory_configurations.rst @@ -332,6 +332,14 @@ is available in the process local heap.(FULLY implemented): * See https://www.OpenGroup.org for further information about these system calls. +The heap of a process starts small. When ``malloc()``, +``memalign()`` or ``realloc()`` find no free chunk that is large enough, +they call ``sbrk()`` and try again. Thus a failed search of the heap of a +process is a normal step, and the heap does not report it: the warning +"Allocation failed" (``CONFIG_DEBUG_MM_WARN``) and the panic of +``CONFIG_MM_PANIC_ON_FAILURE`` come only when ``sbrk()`` fails. +``CONFIG_MM_DUMP_ON_FAILURE`` applies only to the kernel heap. + Shared Memory ^^^^^^^^^^^^^
