MySQL 8.0.39
Source Code Documentation
PFS_buffer_default_array< T > Class Template Reference

#include <pfs_buffer_container.h>

Public Types

typedef T value_type
 

Public Member Functions

value_typeallocate (pfs_dirty_state *dirty_state)
 
void deallocate (value_type *pfs)
 
T * get_first ()
 
T * get_last ()
 

Public Attributes

std::atomic< bool > m_full {false}
 Page full flag. More...
 
PFS_cacheline_atomic_size_t m_monotonic
 Monotonic counter. More...
 
std::atomic< T * > m_ptr {nullptr}
 Array of values. More...
 
std::atomic< size_t > m_max {0}
 Max number of items in the page. More...
 
std::atomic< PFS_opaque_container * > m_container {nullptr}
 Container. More...
 

Member Typedef Documentation

◆ value_type

template<class T >
typedef T PFS_buffer_default_array< T >::value_type

Member Function Documentation

◆ allocate()

template<class T >
value_type * PFS_buffer_default_array< T >::allocate ( pfs_dirty_state dirty_state)
inline

◆ deallocate()

template<class T >
void PFS_buffer_default_array< T >::deallocate ( value_type pfs)
inline

◆ get_first()

template<class T >
T * PFS_buffer_default_array< T >::get_first ( )
inline

◆ get_last()

template<class T >
T * PFS_buffer_default_array< T >::get_last ( )
inline

Member Data Documentation

◆ m_container

template<class T >
std::atomic<PFS_opaque_container *> PFS_buffer_default_array< T >::m_container {nullptr}

Container.

Concurrency profile:

  • written once on page creation
  • read only during normal operations.

◆ m_full

template<class T >
std::atomic<bool> PFS_buffer_default_array< T >::m_full {false}

Page full flag.

Concurrency profile:

  • mostly read during normal operations.
  • do not perform useless write, check for previous value first
  • occasional write on state changes

◆ m_max

template<class T >
std::atomic<size_t> PFS_buffer_default_array< T >::m_max {0}

Max number of items in the page.

Concurrency profile:

  • written once on page creation
  • read only during normal operations.

◆ m_monotonic

template<class T >
PFS_cacheline_atomic_size_t PFS_buffer_default_array< T >::m_monotonic

Monotonic counter.

This counter is used to access items in the page.

Concurrency profile:

  • frequent read and write, must be on its own cacheline

◆ m_ptr

template<class T >
std::atomic<T *> PFS_buffer_default_array< T >::m_ptr {nullptr}

Array of values.

Concurrency profile:

  • written once on page creation
  • read only during normal operations.

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