Re-align LifoSem
authorPhil Willoughby <philwill@fb.com>
Fri, 14 Jul 2017 17:44:50 +0000 (10:44 -0700)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Fri, 14 Jul 2017 17:52:12 +0000 (10:52 -0700)
commit6678c4e68279d3271d337064edec5c69e0450629
treef8de1da31c2658c6b32abd491dfbb83dd7453a97
parent4203522cd540ca69bf2828fd17e02a73ca59ad27
Re-align LifoSem

Summary:
Previously it generated a warning if compiled with -Wover-align because its alignment exceeded alignof(std::max_align_t).

This also meant that heap-allocated LifoSem objects were not guaranteed to be on their own cache-line, potentially degrading performance.

This change adds padding before the important part of the LifoSem (to match the existing after-padding) and reduces its alignment requirement.

Reviewed By: yfeldblum

Differential Revision: D5380700

fbshipit-source-id: 7fdd593a58a2e0c7b03df11152ee4bb66f57e717
folly/LifoSem.h