Community
cancel
Showing results for 
Search instead for 
Did you mean: 
foobar2073
Beginner
28 Views

warnings on AMD Athlon

Hi,
I report a few warnings i got while running the tbb tests on my desktop with Athlon 64 dual core (with linux 32-bits OS) cpu inside.
Should i care about them ? Is there a (simple) way to avoid them ?
./test_atomic.exe
TBB Warning: atomic store on misaligned 8-byte location 0xbfb635e4 is slow
TBB Warning: atomic store on misaligned 8-byte location 0xbfb63614 is slow
done
./test_atomic_pic.exe
TBB Warning: atomic store on misaligned 8-byte location 0xbfafa714 is slow
TBB Warning: atomic store on misaligned 8-byte location 0xbfafa754 is slow
done
[...]
./test_task_scheduler_observer.exe 1:4
done
TBB Warning: Leaked 1 observer_proxy objects
0 Kudos
2 Replies
jimdempseyatthecove
Black Belt
28 Views

Your code (or code in TBB) is performing an atomic instruction to an object of size 8-bytes to alocation that is not a multiple of 8 bytes.

A struct/class member variable is not aligned properly
And/Or an allocation is not using one of the alligned allocation routines.

See if you can determine what is located at those addresses and then determine the reason for the alignment issue.

Note, many O/S's allocation granularity is 8 or 16 bytes. Your Linux might be using 4 byte granularity. Therefore this problem might have been hidden when testing on a different system.

Jim Dempsey
TimP
Black Belt
28 Views

Even in 32-bit linux, the software has a built-in preference for 8-byte alignments. Alignments might be reduced by use of gcc options such as those included in -Os, or by non-optimum layout (possibly with packed storage) within a struct/class.
Reply