#include <bslma_memoryresource.h>
◆ memory_resource() [1/2]
| bsl::memory_resource::memory_resource |
( |
| ) |
|
◆ memory_resource() [2/2]
◆ ~memory_resource()
| bsl::memory_resource::~memory_resource |
( |
| ) |
|
|
inlinevirtual |
◆ allocate()
| void * bsl::memory_resource::allocate |
( |
size_t |
bytes, |
|
|
size_t |
alignment = k_MAX_ALIGN |
|
) |
| |
|
inline |
Return the (non-null) address of a block of memory suitable for holding an object having at least the specified bytes and alignment. If this memory resource is unable to fulfill the request, i.e., because bytes or alignment is too large, then throw bad_alloc or other suitable exception. The behavior is undefined unless alignment is a power of two. Note that this function calls the derived-class implementation of do_allocate.
◆ deallocate()
| void bsl::memory_resource::deallocate |
( |
void * |
p, |
|
|
size_t |
bytes, |
|
|
size_t |
alignment = k_MAX_ALIGN |
|
) |
| |
|
inline |
Deallocate the block of memory at the specified address p and having the specified bytes and alignment by returning it to the derived-class memory resource. The behavior is undefined unless p was allocated from this resource using the same size and alignment and has not yet been deallocated. Note that this function calls the derived-class implementation of do_deallocate.
◆ is_equal()
Return true if memory allocated from this resource can be deallocated from the specified other resource and vice-versa; otherwise return false. Note that this function calls the derived-class implementation of do_is_equal.
◆ operator=()
The documentation for this class was generated from the following file: