zephyr/lib
Nicolas Pitre e2b64777e5 sys_heap: optimize usage of size and used flags
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>
2020-06-21 19:25:35 +02:00
..
cmsis_rtos_v1 zephyr: replace zephyr integer types with C99 types 2020-06-08 08:23:57 -05:00
cmsis_rtos_v2 zephyr: replace zephyr integer types with C99 types 2020-06-08 08:23:57 -05:00
fnmatch ext: lib: Move fnmatch to lib/ 2020-03-20 22:56:19 -04:00
gui zephyr: replace zephyr integer types with C99 types 2020-06-08 08:23:57 -05:00
libc libc: newlib: libc-hooks: Provide our own implementation of __chk_fail() 2020-06-17 17:06:47 +02:00
open-amp lib: open-amp: add helper to add resource table in project 2020-04-01 09:21:15 -05:00
os sys_heap: optimize usage of size and used flags 2020-06-21 19:25:35 +02:00
posix lib: posix: eventfd: support build with !POSIX_API 2020-06-15 16:52:29 +02:00
updatehub zephyr: replace zephyr integer types with C99 types 2020-06-08 08:23:57 -05:00
CMakeLists.txt lib: open-amp: add helper to add resource table in project 2020-04-01 09:21:15 -05:00
Kconfig lib: open-amp: add helper to add resource table in project 2020-04-01 09:21:15 -05:00