Forum Discussion
Altera_Forum
Honored Contributor
15 years agoThanks for confirming I'm not going mad!
I had already come to a similar conclusion and implemented my own wrapper function to code round this. I agree it is a side effect of how the hardware operates, but if you use a function called 'alt_uncached_malloc' which is documented as allocating an uncached region of memory you might assume that this was already taken into account. The static variable attribute ensures that it is aligned with the cache line size, but is it guaranteed that the compiler will not stack anything else directly on the end? I'm not familiar with the compiler internals, but if it does you could still have problems.