FBString: remove unnecessary 7-byte padding in large strings
authorAmir Shalem <amirshalem@fb.com>
Thu, 22 Dec 2016 00:47:55 +0000 (16:47 -0800)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Thu, 22 Dec 2016 01:02:57 +0000 (17:02 -0800)
commitd83fd99b038fff6cea7bffd4729e86e971f5502e
tree2a5d04a5f3ff4bacbb942f84dc4471980a4d37e8
parentb9e7600760578ea5bd09fbfd1d98a91663a57c34
FBString: remove unnecessary 7-byte padding in large strings

Summary:
RefCounted struct contains a pointer to `Char data_[1]`
This saved us a +1 when calculating sizes for the null terminator,
but the compiler made the struct size to be 16, instead of a 8+1.

Reviewed By: Gownta, ot

Differential Revision: D4356429

fbshipit-source-id: 420694feb4b367b0c73d44f83c21a9559ac5e7a3
folly/FBString.h
folly/test/FBStringTest.cpp