[#BloombergLP-bslma-BufferAllocator-2constructor-0fb] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslma.adoc[bslma]::xref:BloombergLP/bslma/BufferAllocator.adoc[BufferAllocator]::BufferAllocator :relfileprefix: ../../../ :mrdocs: Constructors == Synopses Declared in `<bslma_bufferallocator.h>` Create a buffer allocator for allocating memory blocks from the specified `buffer` of the specified `bufSize`. Optionally specify a callback function `allocCallback` that is invoked when a call to `allocate` cannot be fulfilled from `buffer`. Note that maximum alignment is used when allocating memory. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:BloombergLP/bslma/BufferAllocator/2constructor-0fc.adoc[BufferAllocator]( char* buffer, xref:BloombergLP/bslma/Allocator/size_type.adoc[size_type] bufSize, xref:BloombergLP/bslma/BufferAllocator/AllocCallback.adoc[AllocCallback] allocCallback = 0); ---- [.small]#xref:BloombergLP/bslma/BufferAllocator/2constructor-0fc.adoc[_» more..._]# Create a buffer allocator for allocating memory blocks from the specified `buffer` of the specified `bufSize`. Use the specified alignment `strategy` to allocate memory. Optionally specify a callback function `allocCallback` that is invoked when a call to `allocate` cannot be fulfilled from `buffer`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:BloombergLP/bslma/BufferAllocator/2constructor-06.adoc[BufferAllocator]( char* buffer, xref:BloombergLP/bslma/Allocator/size_type.adoc[size_type] bufSize, xref:BloombergLP/bslma/BufferAllocator/AlignmentStrategy.adoc[AlignmentStrategy] strategy, xref:BloombergLP/bslma/BufferAllocator/AllocCallback.adoc[AllocCallback] allocCallback = 0); ---- [.small]#xref:BloombergLP/bslma/BufferAllocator/2constructor-06.adoc[_» more..._]# [.small]#Created with https://www.mrdocs.com[MrDocs]#