This class provides a concrete buffer allocator that implements the Allocator interface, and allocates memory blocks from a fixed‐size buffer that is supplied by the user at construction. The allocator can supply memory that can be maximally (default) or naturally aligned.
Synopsis
Declared in <bslma_bufferallocator.h>
class BufferAllocator
: public Allocator
Base Classes
Name |
Description |
This protocol class provides a pure abstract interface and contract for clients and suppliers of raw memory. If the requested memory cannot be returned, the contract requires that an |
Type Aliases
Name |
Description |
|
|
Alias for an unsigned integral type capable of representing the number of bytes in this platform's virtual address space. |
Enums
Name |
Description |
Types of alignment strategy to allocate memory. |
Member Functions
Name |
Description |
|
Constructors |
|
Destroy this buffer allocator. |
Return a newly allocated block of memory of (at least) the specified positive |
|
This function has no effect for this buffer allocator. |
|
|
|
|
|
Write formatted debugging information to |
Static Member Functions
Name |
Description |
|
|
Throw |
Protected Member Functions
Name |
Description |
|
Return a newly allocated block of memory of (at least) the specified positive |
|
Return the memory block at the specified |
|
Return |
Created with MrDocs