[jmm-dev] @Contended

Aleksey Shipilev aleksey.shipilev at oracle.com
Wed Apr 27 12:16:22 UTC 2016


On 04/27/2016 03:11 PM, Andrew Haley wrote:
> I wonder if it is worth padding AtomicIntegers.

Nope. Alas, @Contended is class-wide, and there are lots of cases where
people are using AtomicIntegers without expecting them to take 10x more
memory all of the sudden. With all the attention false sharing gets, it
sensibly affects specific classes in specific kind of applications only.

-Aleksey




More information about the jmm-dev mailing list