xiaoxiang781216 commented on code in PR #15484: URL: https://github.com/apache/nuttx/pull/15484#discussion_r1912360988
########## mm/mm_heap/mm.h: ########## @@ -182,13 +201,22 @@ struct mm_allocnode_s FAR void *backtrace[CONFIG_MM_BACKTRACE]; /* The backtrace buffer for caller */ # endif #endif -}; +}MM_NODE_STRUCT_PENDING; /* This describes a free chunk */ struct mm_freenode_s { +#ifdef CONFIG_MM_NODE_PENDING + union + { + mmsize_t preceding; /* Physical preceding chunk size */ Review Comment: ditto ########## mm/mm_heap/mm.h: ########## @@ -199,7 +227,7 @@ struct mm_freenode_s #endif FAR struct mm_freenode_s *flink; /* Supports a doubly linked list */ FAR struct mm_freenode_s *blink; -}; +}MM_NODE_STRUCT_PENDING; Review Comment: ditto ########## mm/mm_heap/mm.h: ########## @@ -182,13 +201,22 @@ struct mm_allocnode_s FAR void *backtrace[CONFIG_MM_BACKTRACE]; /* The backtrace buffer for caller */ # endif #endif -}; +}MM_NODE_STRUCT_PENDING; Review Comment: why need ########## mm/mm_heap/mm.h: ########## @@ -173,7 +183,16 @@ typedef size_t mmsize_t; struct mm_allocnode_s { +#ifdef CONFIG_MM_NODE_PENDING + union + { + mmsize_t preceding; /* Physical preceding chunk size */ Review Comment: why not simplify to: ``` mmsize_t preceding aligned_data(MM_ALIGN); ``` -- 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-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org