+ /**
+ * Create a new IOBuf, using a single memory allocation to allocate space
+ * for both the IOBuf object and the data storage space.
+ *
+ * This saves one memory allocation. However, it can be wasteful if you
+ * later need to grow the buffer using reserve(). If the buffer needs to be
+ * reallocated, the space originally allocated will not be freed() until the
+ * IOBuf object itself is also freed. (It can also be slightly wasteful in
+ * some cases where you clone this IOBuf and then free the original IOBuf.)
+ */
+ static std::unique_ptr<IOBuf> createCombined(uint32_t capacity);
+
+ /**
+ * Create a new IOBuf, using separate memory allocations for the IOBuf object
+ * for the IOBuf and the data storage space.
+ *
+ * This requires two memory allocations, but saves space in the long run
+ * if you know that you will need to reallocate the data buffer later.
+ */
+ static std::unique_ptr<IOBuf> createSeparate(uint32_t capacity);
+