Commit b5ddf37
Jyri Sarha
modules: Apparently asking 0 alignment is dangerous, use 4 as default
The current rballoc_align() implementation has this line:
assert(IS_ALIGNED(mem, align));
Which will cause division by zero due to IS_ALIGNED() Zephyr
implementation:
define IS_ALIGNED(ptr, align) (((uintptr_t)(ptr)) % (align) == 0)
So better use 4 as the default value.
Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>1 parent cb65c6a commit b5ddf37
1 file changed
+4
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
191 | 191 | | |
192 | 192 | | |
193 | 193 | | |
194 | | - | |
| 194 | + | |
| 195 | + | |
195 | 196 | | |
196 | 197 | | |
197 | 198 | | |
198 | 199 | | |
199 | 200 | | |
200 | | - | |
| 201 | + | |
| 202 | + | |
201 | 203 | | |
202 | 204 | | |
203 | 205 | | |
| |||
0 commit comments