[#BloombergLP-bslma-SequentialAllocator-expand-08] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslma.adoc[bslma]::xref:BloombergLP/bslma/SequentialAllocator.adoc[SequentialAllocator]::expand :relfileprefix: ../../../ :mrdocs: Expand the memory block at the specified `address` up to `maxNumBytes`. == Synopsis Declared in `<bslma_sequentialallocator.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- int expand( void* address, int originalNumBytes, int maxNumBytes); ---- == Description Increase the amount of memory allocated at the specified `address` from the specified `originalNumBytes` to the maximum amount easily obtainable up to the specified `maxNumBytes`. Return the amount of memory available at `address` after the expansion. The behavior is undefined unless the call to this allocator that provided the `address` was performed with the `originalNumBytes` and `originalNumBytes < maxNumBytes`. Note that this function will not expand the memory unless there have been no allocations since the allocation for `originalNumBytes`. == Return Value The amount of memory available after expansion (in bytes). == Parameters [cols="1,4"] |=== | Name| Description | *address* | The address of the memory block to expand. | *originalNumBytes* | The original allocation size (in bytes). | *maxNumBytes* | The maximum expanded size (in bytes). |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#