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 14:41:46 UTC

[GitHub] rymanluk commented on a change in pull request #715: os_mempool; block size for memory pool has to allow storage for free ?

rymanluk commented on a change in pull request #715: os_mempool; block size for memory pool has to allow storage for free ?
URL: https://github.com/apache/mynewt-core/pull/715#discussion_r159238011
 
 

 ##########
 File path: kernel/os/src/os_mempool.c
 ##########
 @@ -90,7 +90,7 @@ os_mempool_init(struct os_mempool *mp, int blocks, int block_size,
     struct os_memblock *block_ptr;
 
     /* Check for valid parameters */
-    if (!mp || (blocks < 0) || (block_size <= 0)) {
+    if (!mp || (blocks < 0) || (block_size < sizeof(struct os_memblock))) {
 
 Review comment:
   Hi Marco, I saw a comment on #700 but frankly speaking I don't understand why we need this change.
   As I understand `void *membuf`already has already is big enough if OS_MEMPOOL_BYTES() was used to calculate needed memory. Maybe could you say where is the issue you are seeing? I must miss something.

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