Pure abstract protocol for clients and suppliers of raw memory.
Synopsis
Declared in <bslma_allocator.h>
class Allocator
: public std::pmr::memory_resource
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 std::bad_alloc exception be thrown. Note that memory is guaranteed to be sufficiently aligned for any object of the requested size on the current platform, which may be less than the maximal alignment guarantee afforded by global operator new.
Base Classes
Name |
Description |
|
Type Aliases
Name |
Description |
Alias for an unsigned integral type capable of representing the number of bytes in this platform's virtual address space. |
Member Functions
Name |
Description |
|
Destroy this allocator. |
Return a newly allocated block of memory of at least |
|
Return the memory block at |
|
|
|
|
|
Static Member Functions
Name |
Description |
Throw |
Protected Member Functions
Name |
Description |
|
Return a newly allocated block of at least |
|
Return the memory block at |
|
Return whether this allocator can exchange memory with |
Derived Classes
Name |
Description |
Protocol for clients and suppliers of raw aligned memory. |
|
Allocator wrapper that guarantees a specified minimum alignment. |
|
Concrete buffer allocator that allocates from a user‐supplied fixed‐size buffer. |
|
Thread‐enabled adapter that synchronizes access to a decorated allocator. |
|
Thread‐safe allocator that manages pooled memory blocks of uniform size. |
|
This class maintains a count of the total number of allocated bytes. |
|
Concrete allocator that counts bytes currently in use and ever allocated. |
|
Concrete thread‐safe guarding allocator that adjoins a protected guard page to each allocated block. |
|
Memory allocator that obtains storage directly from virtual memory. |
|
This class provides direct access to the system‐supplied (native) global |
|
Protocol for allocators that support releasing all allocated memory. |
|
Protocol for allocators that support releasing all allocated memory. |
|
Concrete allocator adapting global |
|
Concrete test allocator that tracks memory usage for testing. |
Created with MrDocs