[#BloombergLP-bdlma-BufferManager-hasSufficientCapacity] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlma.adoc[bdlma]::xref:BloombergLP/bdlma/BufferManager.adoc[BufferManager]::hasSufficientCapacity :relfileprefix: ../../../ :mrdocs: Return whether the buffer can allocate a block of the specified `size`. == Synopsis Declared in `<bdlma_buffermanager.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- bool hasSufficientCapacity(xref:BloombergLP/bsls/Types/size_type.adoc[bsls::Types::size_type] size) const; ---- == Description Return `true` if there is sufficient memory space in the buffer to allocate a contiguous memory block of the specified `size` (in bytes) after taking the alignment strategy into consideration, and `false` otherwise. The behavior is undefined unless `0 < size`, and this object is currently managing a buffer. == Return Value `true` if a block of `size` bytes can be allocated, and `false` otherwise == Parameters [cols="1,4"] |=== | Name| Description | *size* | number of bytes requested for allocation |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#