1
0
Fork 0
forked from nuttx/nuttx-update

malloc:if malloc filed need print leak memory detatls

Signed-off-by: anjiahao <anjiahao@xiaomi.com>
This commit is contained in:
anjiahao 2024-03-05 18:33:10 +08:00 committed by Xiang Xiao
parent c4f82c1f66
commit c0d416584f

View file

@ -378,6 +378,9 @@ FAR void *mm_malloc(FAR struct mm_heap_s *heap, size_t size)
# endif
# ifdef CONFIG_MM_DUMP_DETAILS_ON_FAILURE
mm_memdump(heap, &dump);
mwarn("Dump leak memory(thread exit, but memory not free):\n");
dump.pid = PID_MM_LEAK;
mm_memdump(heap, &dump);
# endif
#endif
#ifdef CONFIG_MM_PANIC_ON_FAILURE