This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit 018d7d605c4a1bb4b419a4421020394c3ddb82a2
Author: Jiuzhu Dong <[email protected]>
AuthorDate: Fri Jan 28 14:11:47 2022 +0800

    mm/mm_malloc: dump all allocated memory info when malloc failed
    
    Signed-off-by: Jiuzhu Dong <[email protected]>
---
 mm/mm_heap/mm_malloc.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/mm/mm_heap/mm_malloc.c b/mm/mm_heap/mm_malloc.c
index 9a94910..d392c2a 100644
--- a/mm/mm_heap/mm_malloc.c
+++ b/mm/mm_heap/mm_malloc.c
@@ -244,6 +244,8 @@ FAR void *mm_malloc(FAR struct mm_heap_s *heap, size_t size)
   else
     {
       mwarn("WARNING: Allocation failed, size %zu\n", alignsize);
+      mm_memdump(heap, -1);
+      DEBUGASSERT(false);
     }
 #endif
 

Reply via email to