![]() |
MySQL 8.0.43
Source Code Documentation
|
Allocator class for instrumenting allocated memory with Performance Schema keys. More...
#include <unique_ptr.h>
Private Types | |
| using | value_type = T |
| using | size_type = size_t |
Private Member Functions | |
| PFS_allocator (PSI_memory_key key) | |
| Constructor for the class that takes the PFS key to be used. More... | |
| template<typename U > | |
| PFS_allocator (PFS_allocator< U > const &rhs) noexcept | |
| Copy constructor. More... | |
| template<typename U > | |
| PFS_allocator (PFS_allocator< U > &&rhs) noexcept | |
| Move constructor. More... | |
| PSI_memory_key | key () const |
Retrieves the PFS for this allocator object. More... | |
| T * | allocate (std::size_t n) |
Allocate n bytes and return a pointer to the beginning of the allocated memory. More... | |
| void | deallocate (T *p, std::size_t n) noexcept |
Deallocates the n bytes stored in the memory pointer p is pointing to. More... | |
| template<class U , class... Args> | |
| void | construct (U *p, Args &&...args) |
In-place constructs an object of class U in the memory pointed by p. More... | |
| void | destroy (T *p) |
In-place invokes the destructor for class T on object pointed by p. More... | |
| size_type | max_size () const |
| The maximum size available to allocate. More... | |
Private Attributes | |
| PSI_memory_key | m_key |
| The PFS key to be used to allocate memory. More... | |
Allocator class for instrumenting allocated memory with Performance Schema keys.
|
private |
|
private |
|
private |
Constructor for the class that takes the PFS key to be used.
| key | The PFS key to be used. |
|
privatenoexcept |
Copy constructor.
| rhs | The object to copy from. |
|
privatenoexcept |
Move constructor.
| rhs | The object to move from. |
|
private |
Allocate n bytes and return a pointer to the beginning of the allocated memory.
| n | The size of the memory to allocate. |
|
private |
In-place constructs an object of class U in the memory pointed by p.
| p | The pointer to the beginning of the memory to construct the object in. |
| args | The parameters to be used with the U constructor. |
|
privatenoexcept |
Deallocates the n bytes stored in the memory pointer p is pointing to.
| p | The pointer to the beginning of the memory to deallocate. |
| n | The size of the memory to deallocate. |
|
private |
In-place invokes the destructor for class T on object pointed by p.
| p | The object pointer to invoke the destructor on. |
|
private |
Retrieves the PFS for this allocator object.
|
private |
The maximum size available to allocate.
|
private |
The PFS key to be used to allocate memory.