Fix IOBufQueue::preallocate for callers who really wanted a hard max
authorAlan Frindell <afrind@fb.com>
Mon, 19 Nov 2012 21:43:41 +0000 (13:43 -0800)
committerJordan DeLong <jdelong@fb.com>
Sun, 16 Dec 2012 22:45:30 +0000 (14:45 -0800)
commitc462b06498397715b758ab1db07aafd8d0371842
tree63d59b0510a887b183824db112843f188f427ce9
parent01e1af4ac5b08d57c51a3c647e3b9844458abde8
Fix IOBufQueue::preallocate for callers who really wanted a hard max

Summary: D633912 broke unicorn because it relied on preallocate having a hard max.  Add an optional hard max parameter and rename maxHint to newAllocationSize.  Pass the hard max in for unicorn

Test Plan: folly and unicorn unit tests

Reviewed By: tudorb@fb.com

FB internal diff: D634894
folly/experimental/io/IOBufQueue.cpp
folly/experimental/io/IOBufQueue.h
folly/experimental/io/test/IOBufQueueTest.cpp