You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by GitBox <gi...@apache.org> on 2017/12/14 13:03:24 UTC

[GitHub] rymanluk opened a new pull request #700: kernel/os_mempool: Fix for incorrect check on os_mempool_init

rymanluk opened a new pull request #700: kernel/os_mempool: Fix for incorrect check on os_mempool_init
URL: https://github.com/apache/mynewt-core/pull/700
 
 
   This is regression from abd8c4598b as it was changing API incorretly.
   Documentation says that 'block_size' parameter in os_mempool_init() is
   "Minimum size of an individual element in pool"
   
   It does not required from the user to take into account of 'block_size'
   an internal overhead which is sizeof(struct os_memblock).
   
   The only requirement on user is to make sure that provided 'membuf' has
   enough bytes which can be calculated using OS_MEMPOOL_BYTES() macro.
   
   Without this patch we have assert when creating mempool with block_size=4

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services