MySQL  8.0.23
Source Code Documentation
aligned_pointer< T_Type, T_Align_to > Class Template Reference

Manages an object that is aligned to specified number of bytes. More...

#include <ut0new.h>

Inheritance diagram for aligned_pointer< T_Type, T_Align_to >:
aligned_memory< T_Type, ut::INNODB_CACHE_LINE_SIZE >

Public Member Functions

 ~aligned_pointer () override
 
template<typename... T_Args>
void create (T_Args... args)
 Allocates aligned memory for new object and constructs it there. More...
 
void destroy () override
 Destroys the managed object and releases its memory. More...
 
- Public Member Functions inherited from aligned_memory< T_Type, ut::INNODB_CACHE_LINE_SIZE >
virtual ~aligned_memory ()
 
 operator T_Type * () const
 Allows casting to managed objects type to use it directly. More...
 
T_Type * operator-> () const
 Allows referencing the managed object as this was a normal pointer. More...
 

Additional Inherited Members

- Protected Member Functions inherited from aligned_memory< T_Type, ut::INNODB_CACHE_LINE_SIZE >
bool is_object_empty () const
 Checks if no object is currently being managed. More...
 
T_Type * allocate (size_t size)
 Allocates memory for a new object and prepares aligned address for the object. More...
 
void free_memory ()
 Releases memory used to store the object. More...
 

Detailed Description

template<typename T_Type, size_t T_Align_to = ut::INNODB_CACHE_LINE_SIZE>
class aligned_pointer< T_Type, T_Align_to >

Manages an object that is aligned to specified number of bytes.

Template Parameters
T_Typetype of the object that is going to be managed
T_Align_tonumber of bytes to align to

Constructor & Destructor Documentation

◆ ~aligned_pointer()

template<typename T_Type , size_t T_Align_to = ut::INNODB_CACHE_LINE_SIZE>
aligned_pointer< T_Type, T_Align_to >::~aligned_pointer ( )
inlineoverride

Member Function Documentation

◆ create()

template<typename T_Type , size_t T_Align_to = ut::INNODB_CACHE_LINE_SIZE>
template<typename... T_Args>
void aligned_pointer< T_Type, T_Align_to >::create ( T_Args...  args)
inline

Allocates aligned memory for new object and constructs it there.

Parameters
[in]argsarguments to be passed to object constructor

◆ destroy()

template<typename T_Type , size_t T_Align_to = ut::INNODB_CACHE_LINE_SIZE>
void aligned_pointer< T_Type, T_Align_to >::destroy ( )
inlineoverridevirtual

Destroys the managed object and releases its memory.

Implements aligned_memory< T_Type, ut::INNODB_CACHE_LINE_SIZE >.


The documentation for this class was generated from the following file: