Forum Discussion
Altera_Forum
Honored Contributor
15 years agoThe comment about allocations starting/ending in the middle of a cache line is exactly the issue I have been working on this week.
If you use the alt_uncached_malloc function then it does flush the cache and set the cache bypass bit on the returned pointer, but it does not take into account the cache lines when generating the allocation. This means that you will almost certainly have cached and uncached allocations sharing the same cache line(s) which can lead to system hell as mentioned above. Maybe I'm missing something, maybe it's a bug, or maybe it's 'by design' but if you do not account for it things can get nasty.