anchao commented on code in PR #18468:
URL: https://github.com/apache/nuttx/pull/18468#discussion_r2881476089
##########
mm/mm_heap/mm_memdump.c:
##########
@@ -223,6 +223,29 @@ static void memdump_handler(FAR struct mm_allocnode_s
*node, FAR void *arg)
}
}
+#if CONFIG_MM_BACKTRACE >= 0
+struct memdump_tcb_arg_s
+{
+ FAR struct mm_heap_s *heap;
+ unsigned long seqmin;
+ unsigned long seqmax;
+};
+
+static void memdump_tcb_handler(FAR struct tcb_s *tcb, FAR void *arg)
+{
+ struct mallinfo_task info;
+ struct malltask task;
+ FAR struct memdump_tcb_arg_s *tcb_arg = arg;
+
+ task.pid = tcb ? tcb->pid : PID_MM_LEAK;
+ task.seqmin = tcb_arg->seqmin;
+ task.seqmax = tcb_arg->seqmax;
+ info = mm_mallinfo_task(tcb_arg->heap, &task);
+ syslog(LOG_INFO, "pid:%5d, used:%10d, nused:%10d\n",
Review Comment:
```suggestion
syslog(LOG_INFO, "PID: %5d, Used: %10d, NUsed: %10d\n",
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]