You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2022/03/27 01:32:40 UTC

[GitHub] [incubator-nuttx] Donny9 commented on a change in pull request #5855: mm/memdump: dynamic turn on backtrace in heap when enable DEBUG_MM

Donny9 commented on a change in pull request #5855:
URL: https://github.com/apache/incubator-nuttx/pull/5855#discussion_r835832879



##########
File path: mm/mm_heap/mm.h
##########
@@ -93,17 +93,24 @@
 #ifdef CONFIG_DEBUG_MM
 #  define MM_MIN_SHIFT       (MM_MIN_SHIFT_ + 2)
 #  define MM_BACKTRACE_DEPTH 8
-#  define MM_ADD_BACKTRACE(ptr) \
+#  define MM_ADD_BACKTRACE(heap, ptr) \
      do \
        { \
          FAR struct mm_allocnode_s *tmp = (FAR struct mm_allocnode_s *)(ptr); \
          tmp->pid = getpid(); \
-         memset(tmp->backtrace, 0, sizeof(tmp->backtrace)); \
-         backtrace(tmp->backtrace, MM_BACKTRACE_DEPTH); \
+         if (heap->mm_procfs.backtrace) \

Review comment:
       Done! Thks!




-- 
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: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org