Memory manager that dispenses heterogeneous blocks from an external buffer.
Synopsis
Declared in <bdlma_buffermanager.h>
class BufferManager;
Description
This class implements a buffer manager that dispenses heterogeneous blocks of memory (of varying, user‐specified sizes) from an external buffer whose address and size are optionally supplied at construction. If an allocation request exceeds the remaining free memory space in the external buffer, the allocation request returns 0 if allocate is used, or results in undefined behavior if allocateRaw is used. Note that in no event will the buffer manager attempt to deallocate the external buffer.
Member Functions
Name |
Description |
|
Constructors |
|
Destroy this buffer manager. |
Return the alignment strategy passed to this object at construction. |
|
Return a contiguous block of memory of the specified |
|
Return a contiguous block of memory of the specified |
|
Return an address providing modifiable access to the buffer currently managed by this object, or 0 if this object currently manages no buffer. |
|
Return the size (in bytes) of the buffer currently managed by this object, or 0 if this object currently manages no buffer. |
|
Return the alignment offset for |
|
Destroy the specified |
|
Destroy the specified |
|
Expand the allocation at |
|
Return whether the buffer can allocate a block of the specified |
|
Release all memory currently allocated through this buffer manager. |
|
Replace the managed buffer with |
|
Reset this buffer manager to its default‐constructed state. |
|
Truncate the allocation at |
Created with MrDocs