Fix bug where capacity is not updated correctly after reserveLarge()
authorAmir Shalem <amirshalem@fb.com>
Wed, 21 Dec 2016 06:25:34 +0000 (22:25 -0800)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Wed, 21 Dec 2016 06:33:28 +0000 (22:33 -0800)
commit6d04232339c9420554eb203a227da8c31aa5477c
tree629659506f5cb0539f305be5ece7d735a4171220
parent054b2c1a15f740d59b34273030a582ec26c93794
Fix bug where capacity is not updated correctly after reserveLarge()

Summary:
When reallocating new large string, using reserveLarge(), make sure to update the new capacity for the RefCounted string data
to reflect the amount of data allocated by jemalloc for our block (using goodMallocSize())

Reviewed By: Gownta

Differential Revision: D4355440

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