MySQL 9.1.0
Source Code Documentation
ut::Cacheline_padded< T > Struct Template Reference

A utility wrapper class, which adds padding at the end of the wrapped structure, so that the next object after it is guaranteed to be in the next cache line. More...

#include <ut0cpu_cache.h>

Inheritance diagram for ut::Cacheline_padded< T >:
[legend]

Public Attributes

char pad [INNODB_CACHE_LINE_SIZE]
 

Detailed Description

template<typename T>
struct ut::Cacheline_padded< T >

A utility wrapper class, which adds padding at the end of the wrapped structure, so that the next object after it is guaranteed to be in the next cache line.

This is to avoid false-sharing. Use this, as opposed to alignas(), to avoid problems with allocators which do not handle over-aligned types.

Member Data Documentation

◆ pad

template<typename T >
char ut::Cacheline_padded< T >::pad[INNODB_CACHE_LINE_SIZE]

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