mirror of
https://github.com/zephyrproject-rtos/zephyr
synced 2025-09-03 08:11:56 +00:00
The block alignment must be enforced for statically allocated slabs as well as runtime initialized ones. It is best to implement this check only once in create_free_list() which is invoked by both k_mem_slab_init() and init_mem_slab_module(), where pointers are about to be set for the first time. It is then unnecessary to perform this test on every slab allocation as the alignment won't change at that point. And not only the block size needs to be aligned, but the buffer as well. Signed-off-by: Nicolas Pitre <npitre@baylibre.com> |
||
---|---|---|
.. | ||
include | ||
atomic_c.c | ||
CMakeLists.txt | ||
compiler_stack_protect.c | ||
device.c | ||
errno.c | ||
idle.c | ||
init.c | ||
Kconfig | ||
Kconfig.power_mgmt | ||
mailbox.c | ||
mem_domain.c | ||
mem_slab.c | ||
mempool.c | ||
msg_q.c | ||
mutex.c | ||
pipes.c | ||
poll.c | ||
queue.c | ||
sched.c | ||
sem.c | ||
smp.c | ||
stack.c | ||
system_work_q.c | ||
thread_abort.c | ||
thread.c | ||
timeout.c | ||
timer.c | ||
userspace_handler.c | ||
userspace.c | ||
version.c | ||
work_q.c |