Pack PackedSyncPtr
authorChristopher Dykes <cdykes@fb.com>
Wed, 8 Jun 2016 19:51:28 +0000 (12:51 -0700)
committerFacebook Github Bot 8 <facebook-github-bot-8-bot@fb.com>
Wed, 8 Jun 2016 19:53:27 +0000 (12:53 -0700)
Summary: The comment was right about the packed attribute not liking private members, so pack `PackedSyncPtr` to get GCC to pack structs containing it correctly.

Reviewed By: yfeldblum

Differential Revision: D3402936

fbshipit-source-id: 11d9def132d5dedf04b0e263c379cac339a52fa3

folly/PackedSyncPtr.h

index 00dc1e2..3db7ff1 100644 (file)
@@ -135,7 +135,7 @@ public:
 
  private:
   PicoSpinLock<uintptr_t> data_;
-};
+} FOLLY_PACK_ATTR;
 
 static_assert(
     std::is_pod<PackedSyncPtr<void>>::value,