zephyr/lib
Nicolas Pitre 132b2b8c99 mempool: trap on double-free instances
A double-free could cause very hard to find bugs when using the mempool
allocator as the same memory would end up being allocated twice
afterwards.

Now that bits in the block bitmap are cleared only when actually freeing
a block, we may simply ensure those bits are still set before clearing
them, effectively catching most double-free cases.

The alloc_bit_is_set() function is made static inline so that when
assertion checks are disabled the compiler won't complain about unused
code.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2019-11-06 21:42:42 +01:00
..
cmsis_rtos_v1 kconfig: Clean up header comments and make them consistent 2019-11-04 17:31:27 -05:00
cmsis_rtos_v2 kconfig: Clean up header comments and make them consistent 2019-11-04 17:31:27 -05:00
gui kconfig: Clean up header comments and make them consistent 2019-11-04 17:31:27 -05:00
libc kconfig: Change some '#Comment' comments to '# Comment' 2019-11-04 17:31:27 -05:00
os mempool: trap on double-free instances 2019-11-06 21:42:42 +01:00
posix kconfig: Clean up header comments and make them consistent 2019-11-04 17:31:27 -05:00
updatehub kconfig: Clean up header comments and make them consistent 2019-11-04 17:31:27 -05:00
CMakeLists.txt libc: Added Kconfig choice to select C library 2019-11-01 14:18:36 +01:00
Kconfig kconfig: Clean up header comments and make them consistent 2019-11-04 17:31:27 -05:00