Constructors
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.
BufferAllocator(
char* buffer,
size_type bufSize,
AllocCallback allocCallback = 0);
» 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.
BufferAllocator(
char* buffer,
size_type bufSize,
AlignmentStrategy strategy,
AllocCallback allocCallback = 0);
» more...