Skip to content
Commit 31244724 authored by Nicolas Pitre's avatar Nicolas Pitre Committed by Benjamin Cabé
Browse files

kernel: k_aligned_alloc: simplify assertion



Let's avoid division and modulus operations as they're costly... and even
more so when they're unnecessary as in this case the main constraint is
about the alignment being a power of 2 which is a very small subset of
sizeof(void *) multiples.

Then move the assertion to common code for wider coverage.

Signed-off-by: default avatarNicolas Pitre <npitre@baylibre.com>
parent ea7a9692
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment