1140bd090c
The free block bitmap uses either extra memory specified by a pointer in struct sys_mem_pool_lvl or the space occupied by that pointer directly if the bitmap length is small enough to fit it. But the test is wrong. the inline bitmap should be used if the number of required bits is smaller or _equal_ to the pointer size. Not doing so would wrongly bounce the free block bitmap to extra memory when the number of blocks is exactly 32, which is in disagreement with Z_MPOOL_LBIT_WORDS() that correctly returns 0 in that case. In theory that mean that this bug would causes an overflow of the free block bitmap whenever one level has exactly 32 blocks. But right now there is a separate bug fixed separately that over-sizes the extra block bitmap mitigating this bug. Signed-off-by: Nicolas Pitre <npitre@baylibre.com> |
||
---|---|---|
.. | ||
assert.c | ||
base64.c | ||
CMakeLists.txt | ||
crc7_sw.c | ||
crc8_sw.c | ||
crc16_sw.c | ||
crc32_sw.c | ||
fdtable.c | ||
json.c | ||
Kconfig | ||
mempool.c | ||
mutex.c | ||
printk.c | ||
rb.c | ||
ring_buffer.c | ||
thread_entry.c | ||
work_q.c |