130963ad2f
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> |
||
---|---|---|
.. | ||
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 | ||
heap.c | ||
heap.h | ||
hex.c | ||
json.c | ||
Kconfig | ||
mempool.c | ||
mutex.c | ||
notify.c | ||
onoff.c | ||
printk.c | ||
rb.c | ||
ring_buffer.c | ||
sem.c | ||
thread_entry.c | ||
timeutil.c | ||
work_q.c |