Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
enforce alignment on channels::detail::AtomicQueue consumer types
Summary: Class template `folly::channels::detail::AtomicQueue` is parameterized by a consumer type template. The class holds pointers to consumers but, in the interest of minimizing memory usage, may steal the two lowest bits of the pointers. A unit-test for `AtomicQueue` uses a consumer type holding only a `bool`, giving that consumer type alignment 1 and therefore pointers to it no bits allowable to steal. Enforce a minimum alignment on the consumer type that allows stealing the two lowest bits of pointers, and update the unit-test. Reviewed By: dmm-fb Differential Revision: D64287317 fbshipit-source-id: fb54e15559f12d82717cbea20075c01adfa6e8d1
- Loading branch information