Skip to content

Commit

Permalink
mm: dump more information when failed dump detail
Browse files Browse the repository at this point in the history
Signed-off-by: buxiasen <[email protected]>
  • Loading branch information
jasonbu committed Oct 11, 2024
1 parent b4b30dd commit 6165791
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions mm/mm_heap/mm_malloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,16 @@ FAR void *mm_malloc(FAR struct mm_heap_s *heap, size_t size)
mwarn("Dump leak memory(thread exit, but memory not free):\n");
dump.pid = PID_MM_LEAK;
mm_memdump(heap, &dump);
# ifdef CONFIG_MM_HEAP_MEMPOOL
mwarn("Dump block used by mempool expand/trunk:\n");
dump.pid = PID_MM_MEMPOOL;
mm_memdump(heap, &dump);
# endif
# if CONFIG_MM_BACKTRACE >= 0
mwarn("Dump allocated orphan nodes. (neighbor of free nodes):\n");
dump.pid = PID_MM_ORPHAN;
mm_memdump(heap, &dump);
# endif
# endif
#endif
#ifdef CONFIG_MM_PANIC_ON_FAILURE
Expand Down

0 comments on commit 6165791

Please sign in to comment.