e2b64777e5
By storing the used flag in the LSB, it is no longer necessary to have a size_mask variable to locate that flag. This produces smaller and faster code. Replace the validation check in chunk_set() to base it on the storage type. Also clarify the semantics of set_chunk_size() which allows for clearing the used flag bit unconditionally which simplifies the code further. The idea of moving the used flag bit into the LEFT_SIZE field was raised. It turns out that this isn't as beneficial as it may seem because the used bit is set only once i.e. when the memory is handed off to a user and the size field becomes frozen at that point. Modifications on the leftward chunk may still occur and extra instructions to preserve that bit would be necessary if it were moved there. 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 |