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


##########
mm/tlsf/mm_tlsf.c:
##########
@@ -404,33 +399,31 @@ static void memdump_handler(FAR void *ptr, size_t size, 
int used,
                             FAR void *user)
 {
   FAR const struct mm_memdump_s *dump = user;
-#if CONFIG_MM_BACKTRACE >= 0
-  FAR struct memdump_backtrace_s *buf;
-
-  size -= sizeof(struct memdump_backtrace_s);
-  buf = ptr + size;
-#endif
 
   if (used)
     {
 #if CONFIG_MM_BACKTRACE < 0
       if (dump->pid == PID_MM_ALLOC)
 #else
+      FAR struct memdump_backtrace_s *buf =
+        ptr + size - sizeof(struct memdump_backtrace_s);
+
       if ((dump->pid == PID_MM_ALLOC || dump->pid == buf->pid) &&
           buf->seqno >= dump->seqmin && buf->seqno <= dump->seqmax)
 #endif
         {
 #if CONFIG_MM_BACKTRACE < 0
           syslog(LOG_INFO, "%12zu%*p\n", size, MM_PTR_FMT_WIDTH, ptr);
 #else
+          char tmp[CONFIG_MM_BACKTRACE * MM_PTR_FMT_WIDTH + 1] =

Review Comment:
   Done.



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