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/30 17:37:12 UTC

[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a change in pull request #5914: mm/mm_heap: MMSIZE_MAX should be half of UINT16_MAX/UINT32_MAX.

xiaoxiang781216 commented on a change in pull request #5914:
URL: https://github.com/apache/incubator-nuttx/pull/5914#discussion_r838803259



##########
File path: mm/mm_heap/mm.h
##########
@@ -130,10 +130,10 @@
 
 #ifdef CONFIG_MM_SMALL
 # define MM_ALLOC_BIT    0x8000
-# define MMSIZE_MAX      UINT16_MAX
+# define MMSIZE_MAX      (UINT16_MAX >> 1)

Review comment:
       it's better to move the special bit to the low end since heap always allocate the memory at least 2bytes alignment.




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