[#BloombergLP-bdlma-BufferManager-expand] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlma.adoc[bdlma]::xref:BloombergLP/bdlma/BufferManager.adoc[BufferManager]::expand :relfileprefix: ../../../ :mrdocs: Expand the allocation at `address` to include the remaining buffer. == Synopsis Declared in `<bdlma_buffermanager.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:BloombergLP/bsls/Types/size_type.adoc[bsls::Types::size_type] expand( void* address, xref:BloombergLP/bsls/Types/size_type.adoc[bsls::Types::size_type] size); ---- == Description Increase the amount of memory allocated at the specified `address` from the original `size` (in bytes) to also include the maximum amount remaining in the buffer. Return the amount of memory available at `address` after expanding, or `size` if the memory at `address` cannot be expanded. This method can only `expand` the memory block returned by the most recent `allocate` or `allocateRaw` request from this buffer manager, and otherwise has no effect. The behavior is undefined unless the memory at `address` was originally allocated by this buffer manager, the size of the memory at `address` is `size`, and `release` was not called after allocating the memory at `address`. == Return Value amount of memory available at `address` after expanding, or `size` if the memory at `address` cannot be expanded == Parameters [cols="1,4"] |=== | Name| Description | *address* | memory previously allocated by this buffer manager | *size* | current size in bytes of the allocation at `address` |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#