[#BloombergLP-bdlma-BufferManager-2constructor-0c6] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlma.adoc[bdlma]::xref:BloombergLP/bdlma/BufferManager.adoc[BufferManager]::BufferManager :relfileprefix: ../../../ :mrdocs: Constructors == Synopses Declared in `<bdlma_buffermanager.h>` Create a buffer manager for allocating memory blocks. Optionally specify an alignment `strategy` used to align allocated memory blocks. If `strategy` is not specified, natural alignment is used. A default constructed buffer manager is unable to allocate any memory until an external buffer is provided by calling the `replaceBuffer` method. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- explicit xref:BloombergLP/bdlma/BufferManager/2constructor-0c7.adoc[BufferManager](xref:BloombergLP/bsls/Alignment/Strategy.adoc[bsls::Alignment::Strategy] strategy = bsls::Alignment::BSLS_NATURAL); ---- [.small]#xref:BloombergLP/bdlma/BufferManager/2constructor-0c7.adoc[_» more..._]# Create a buffer manager for allocating memory blocks from the specified external `buffer` having the specified `bufferSize` (in bytes). Optionally specify an alignment `strategy` used to align allocated memory blocks. If `strategy` is not specified, natural alignment is used. The behavior is undefined unless `0 < bufferSize` and `buffer` has at least `bufferSize` bytes. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:BloombergLP/bdlma/BufferManager/2constructor-07.adoc[BufferManager]( char* buffer, xref:BloombergLP/bsls/Types/size_type.adoc[bsls::Types::size_type] bufferSize, xref:BloombergLP/bsls/Alignment/Strategy.adoc[bsls::Alignment::Strategy] strategy = bsls::Alignment::BSLS_NATURAL); ---- [.small]#xref:BloombergLP/bdlma/BufferManager/2constructor-07.adoc[_» more..._]# [.small]#Created with https://www.mrdocs.com[MrDocs]#