zephyr/lib/os
Nicolas Pitre 1140bd090c mempool: properly use the inline free block bitmap
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>
2019-06-25 23:24:05 -04:00
..
assert.c misc: assert_post_action: Added __weak keyword. 2019-03-02 12:26:21 -05:00
base64.c all: Add 'U' suffix when using unsigned variables 2019-03-28 17:15:58 -05:00
CMakeLists.txt license: cleanup: add SPDX Apache-2.0 license identifier 2019-04-07 08:45:22 -04:00
crc7_sw.c lib: flatten all loose components into one lib 2019-01-22 07:45:22 -05:00
crc8_sw.c lib: flatten all loose components into one lib 2019-01-22 07:45:22 -05:00
crc16_sw.c all: Update unsigend 'U' suffix due to multiplication 2019-03-28 17:15:58 -05:00
crc32_sw.c lib: flatten all loose components into one lib 2019-01-22 07:45:22 -05:00
fdtable.c net: sockets: move fcntl back to socket_offload.c 2019-03-20 11:36:18 -05:00
json.c json: make it 64-bit compatible 2019-06-05 07:47:41 -04:00
Kconfig lib: flatten all loose components into one lib 2019-01-22 07:45:22 -05:00
mempool.c mempool: properly use the inline free block bitmap 2019-06-25 23:24:05 -04:00
mutex.c lib: os: add sys_mutex data type 2019-04-03 13:47:45 -04:00
printk.c printk: make it 64-bit compatible 2019-06-17 10:28:44 -07:00
rb.c lib: rb: Make operands have an appropriate essential type 2019-03-26 22:06:45 -04:00
ring_buffer.c lib: os: ring_buffer: Fix not handled return value 2019-03-14 08:40:18 +01:00
thread_entry.c lib: os: remove dead code 2019-06-18 09:08:01 -04:00
work_q.c lib: flatten all loose components into one lib 2019-01-22 07:45:22 -05:00