Commit d6ca1a3
committed
zephyr: Fix Zephyr heap metadata corruption
Zephyr stores heap metadata just before each allocated chunk. So not only
must the chunk start be aligned to cache line size, but the chunk size
must also be aligned up to cache line size. This is to prevent metadata
corruption in case an invalidate is called for a chunk -- it may corrupt
metadata for the next chunk if it is located in the same cache line.
Signed-off-by: Serhiy Katsyuba <serhiy.katsyuba@intel.com>1 parent 8d44f26 commit d6ca1a3
1 file changed
+8
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
471 | 471 | | |
472 | 472 | | |
473 | 473 | | |
474 | | - | |
475 | | - | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
476 | 481 | | |
477 | 482 | | |
| 483 | + | |
478 | 484 | | |
479 | 485 | | |
480 | 486 | | |
| |||
0 commit comments