xiaoxiang781216 commented on code in PR #18468:
URL: https://github.com/apache/nuttx/pull/18468#discussion_r2881490228


##########
mm/mm_heap/mm_memdump.c:
##########
@@ -301,6 +324,18 @@ void mm_memdump(FAR struct mm_heap_s *heap,
     {
       syslog(LOG_INFO, "Dump allocated orphan nodes\n");
     }
+#if CONFIG_MM_BACKTRACE >= 0
+  else if (pid == PID_MM_ALL_PID)
+    {
+      syslog(LOG_INFO, "Dump all pid memory allocated\n");
+      struct memdump_tcb_arg_s tcb_arg;
+      tcb_arg.heap = heap;
+      tcb_arg.seqmin = dump->seqmin;
+      tcb_arg.seqmax = dump->seqmax;
+      nxsched_foreach(memdump_tcb_handler, &tcb_arg);

Review Comment:
   ok, but why not pass dump to nxsched_foreach and remove memdump_tcb_arg_s.
   BTW, it's better to integrate this feature to meminfo_read with an 
Kconfig(e.g. CONFIG_FS_PROCFS_MEMINFO_DETAIL) by extending 
procfs_meminfo_entry_s::mallinfo to procfs_meminfo_entry_s::mallinfo_task



-- 
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]

Reply via email to