Fill buffer before allocating more
authorNick Terrell <terrelln@fb.com>
Mon, 13 Mar 2017 19:50:55 +0000 (12:50 -0700)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Mon, 13 Mar 2017 20:04:54 +0000 (13:04 -0700)
commit03d240dc01f3821797183d8eae6237ef33c2edfc
treea802d30ce843236804596c43d2b41af9c4700a82
parenta2353bc0411329fa89e837bd06c869b5367381ba
Fill buffer before allocating more

Summary:
Modify `QueueAppender::pushAtMost(const uint8_t*, size_t)` to fill the end of
the current buffer before it allocates another.

Reviewed By: yfeldblum

Differential Revision: D4687832

fbshipit-source-id: 7c21f4359da9f0cf26d9577abddfd640b0c877e9
folly/io/Cursor.h
folly/io/test/IOBufCursorTest.cpp