X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=folly%2FIndexedMemPool.h;h=cab5cac1f437c2faa258c512cabe0c782fd555d5;hb=8091d7199edecafa678d009b82f04c36dd8ce9a7;hp=82ae62954d97f05b3967723c069b604e6a224f2c;hpb=1166fe0e3deb1548ef173f8952fc8fd7225ee8fd;p=folly.git diff --git a/folly/IndexedMemPool.h b/folly/IndexedMemPool.h index 82ae6295..cab5cac1 100644 --- a/folly/IndexedMemPool.h +++ b/folly/IndexedMemPool.h @@ -351,7 +351,7 @@ struct IndexedMemPool : boost::noncopyable { } }; - struct FOLLY_ALIGN_TO_AVOID_FALSE_SHARING LocalList { + struct alignas(hardware_destructive_interference_size) LocalList { AtomicStruct head; LocalList() : head(TaggedPtr{}) {} @@ -377,7 +377,7 @@ struct IndexedMemPool : boost::noncopyable { /// raw storage, only 1..min(size_,actualCapacity_) (inclusive) are /// actually constructed. Note that slots_[0] is not constructed or used - FOLLY_ALIGN_TO_AVOID_FALSE_SHARING Slot* slots_; + alignas(hardware_destructive_interference_size) Slot* slots_; /// use AccessSpreader to find your list. We use stripes instead of /// thread-local to avoid the need to grow or shrink on thread start @@ -386,7 +386,8 @@ struct IndexedMemPool : boost::noncopyable { /// this is the head of a list of node chained by globalNext, that are /// themselves each the head of a list chained by localNext - FOLLY_ALIGN_TO_AVOID_FALSE_SHARING AtomicStruct globalHead_; + alignas(hardware_destructive_interference_size) + AtomicStruct globalHead_; ///////////// private methods