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:
parent
c4f82c1f66
commit
c0d416584f
1 changed files with 3 additions and 0 deletions
|
@ -378,6 +378,9 @@ FAR void *mm_malloc(FAR struct mm_heap_s *heap, size_t size)
|
||||||
# endif
|
# endif
|
||||||
# ifdef CONFIG_MM_DUMP_DETAILS_ON_FAILURE
|
# ifdef CONFIG_MM_DUMP_DETAILS_ON_FAILURE
|
||||||
mm_memdump(heap, &dump);
|
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
|
||||||
#endif
|
#endif
|
||||||
#ifdef CONFIG_MM_PANIC_ON_FAILURE
|
#ifdef CONFIG_MM_PANIC_ON_FAILURE
|
||||||
|
|
Loading…
Reference in a new issue