zephyr/lib/os
Nicolas Pitre 130963ad2f lib/os/heap: add an additional validation criteria
One fundamental validation criteria is to never have consecutive free
chunks. If that ever happens we failed to merge them. That means a free
chunk must always be surrounded by used chunks.

It is a pain to extend valid_chunk() with new rules as it is.
So a VALIDATE() macro is introduced to make things easier to work with.
It also allows for isolating each test, possibly making VALIDATE() into
__ASSERT() to determine exactly which test is tripping when debugging.

Finally, because of that new validation rule, sys_heap_validate() must
be modified so not to use valid_chunk() while it is flipping all the
"used" flags. So let's run valid_chunk() up front before alterating
chunk headers.

Now sys_heap_validate() has become justifiably more expensive and a few
emulated targets are about to bust the tests/lib/heap test timeout. So
bump the timeout as well.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2020-07-14 19:35:52 -04:00
..
assert.c
base64.c
CMakeLists.txt
crc7_sw.c
crc8_sw.c
crc16_sw.c
crc32_sw.c
dec.c
fdtable.c
heap-validate.c lib/os/heap: add an additional validation criteria 2020-07-14 19:35:52 -04:00
heap.c lib/os/heap: code cleanup 2020-07-14 19:35:52 -04:00
heap.h lib/os/heap: debugging facility to dump the heap structure to the cconsole 2020-06-26 11:41:43 -07:00
hex.c
json.c json: Add top-level array encoding support 2020-06-19 18:21:27 +02:00
Kconfig kernel/printk: Make it synchronous 2020-06-27 08:14:58 -04:00
mempool.c
mutex.c
notify.c
onoff.c
printk.c kernel/printk: Make it synchronous 2020-06-27 08:14:58 -04:00
rb.c
ring_buffer.c
sem.c
thread_entry.c
timeutil.c
work_q.c