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/08/04 09:19:31 UTC

[GitHub] [incubator-nuttx] davids5 commented on pull request #6780: iob_s add io_private filed, user can use it to keep context

davids5 commented on PR #6780:
URL: https://github.com/apache/incubator-nuttx/pull/6780#issuecomment-1204990858

   It might not be obvious that the design patterns used in NuttX were intentionally very memory/resource conscious from the start. These patterns are extremely important to preserve! 
   
   The optimization of the memory footprint was taken into account using CONFIG_IOB_BUFSIZE to save a **single** byte per struct. https://github.com/luojun1234/incubator-nuttx/blob/d6affff1241004452267921f5291cfcacc39653d/include/nuttx/mm/iob.h#L104-L110 
   
   So it would not make sense to add 4  bytes per struct that is an optional use field without being able to to disable it.
   
   Inheritance or the default 0 length array would be ways to solve this problem as well. 
   
   As a project we should be all for flexibility and serving all users use cases, but not at the expense of other users. 
   
   


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