[#BloombergLP-bdlsb-MemOutStreamBuf_Util-computeNewCapacity] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlsb.adoc[bdlsb]::xref:BloombergLP/bdlsb/MemOutStreamBuf_Util.adoc[MemOutStreamBuf_Util]::computeNewCapacity :relfileprefix: ../../../ :mrdocs: Return the capacity to be used to contain data having the specified `newLength` when the current capacity is the specified `currentCapacity`. The returned value may be larger than `newLength` to allow for growth without the need for reallocation. == Synopsis Declared in `<bdlsb_memoutstreambuf.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static std::size_t computeNewCapacity( std::size_t newLength, std::size_t currentCapacity); ---- [.small]#Created with https://www.mrdocs.com[MrDocs]#