apache / mynewt-nimble

Apache mynewt
https://mynewt.apache.org/
Apache License 2.0
691 stars 394 forks source link

nimble/porting: Fix OS_MEMPOOL_SIZE() macro #1762

Closed donatieng closed 5 months ago

donatieng commented 5 months ago

The OS_MEMPOOL_SIZE() macro returns an invalid size when guards are used (an additional 4 bytes must be reserved for each block, which is not done at the moment). Correct this in line with the macro defined in mynewt core.

donatieng commented 5 months ago

Reference: https://github.com/apache/mynewt-core/blob/cc006e6025682c4e0563496fc1014b7d9d07b78c/kernel/os/include/os/os_mempool.h#L179