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 2018/01/02 22:03:34 UTC

[GitHub] wes3 commented on issue #715: os_mempool; block size for memory pool has to allow storage for free ?

wes3 commented on issue #715: os_mempool; block size for memory pool has to allow storage for free ?
URL: https://github.com/apache/mynewt-core/pull/715#issuecomment-354887198
 
 
   I will throw in my two cents here. Well, call it 1c euro :-) I think the user should be able to pass in a value of 1, 2 or 3. I think a value of 0 should be thrown away (error). The only problem I can see is changing the size of os_memblock such that the minimum block size that we align the block to is < sizeof(os_memblock). So, this is what I would do:
   
   1) The check in the code should be <= 0.
   2) "Compile time" error (#error) if the sizeof(os_memblock) < alignment size.
   
   Of course, we could modify the OS_MEMPOOL_BYTES macro to deal with this but why bother? I cannot see changing the size of os_memblock and alignment should always be to, at least, the min pointer size.

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