Update CachelinePadded
authorPhil Willoughby <philwill@fb.com>
Fri, 14 Jul 2017 09:56:14 +0000 (02:56 -0700)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Fri, 14 Jul 2017 10:09:23 +0000 (03:09 -0700)
commit46a851f49b64fe44c7643eec03e8b16096d9837d
tree7bc703c04563d81251bef026009089bb6b540985
parent130d4f661978a9d43a5d16fefed41dd2ea213505
Update CachelinePadded

Summary:
The C++ standard doesn't guarantee alignment of things bigger than std::max_align_t which is typically 16 bytes. This means that to ensure something is the only thing on a cache-line we need padding on each side of it to exclude anything else.

CachelinePadded<T> will now be larger than it was before, and reinterpret_cast to/from T is no longer valid.

Reviewed By: yfeldblum

Differential Revision: D5380849

fbshipit-source-id: 20f275c875eb4bede4aef19ac7224913ce9b6d51
folly/CachelinePadded.h
folly/Makefile.am
folly/detail/CachelinePaddedImpl.h [deleted file]
folly/test/CachelinePaddedTest.cpp