[#BloombergLP-bslma-SequentialAllocator-allocateAndExpand-06] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslma.adoc[bslma]::xref:BloombergLP/bslma/SequentialAllocator.adoc[SequentialAllocator]::allocateAndExpand :relfileprefix: ../../../ :mrdocs: Return memory of at least the specified `*size` and at most `maxNumBytes`. == Synopsis Declared in `<bslma_sequentialallocator.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- void* allocateAndExpand( int* size, int maxNumBytes); ---- == Description Return memory of at least the specified `*size` and at most the specified `maxNumBytes`. Also return the actual amount of memory allocated in `*size`. If `*size` is 0, no memory is allocated and 0 is returned. The behavior is undefined unless `0 <= *size <= maxNumBytes`. == Return Value The address of the allocated memory block. == Parameters [cols="1,4"] |=== | Name| Description | *size* | The requested size (in/out); updated with the actual size. | *maxNumBytes* | The maximum number of bytes to allocate. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#