MySQL  8.0.19
Source Code Documentation
my_pointer_arithmetic.h File Reference
#include <stdint.h>

Go to the source code of this file.


#define MY_ALIGN(A, L)   (((A) + (L)-1) & ~((L)-1))
#define ALIGN_SIZE(A)   MY_ALIGN((A), sizeof(double))


template<typename T >
bool is_aligned_to (T *t, int increment)
template<typename T >
bool is_aligned (T *t)

Detailed Description

Some macros for dealing with pointer arithmetic, e.g., aligning of buffers to a given size.

Macro Definition Documentation


#define ALIGN_SIZE (   A)    MY_ALIGN((A), sizeof(double))


#define MY_ALIGN (   A,
)    (((A) + (L)-1) & ~((L)-1))

Function Documentation

◆ is_aligned()

template<typename T >
bool is_aligned ( T *  t)

◆ is_aligned_to()

template<typename T >
bool is_aligned_to ( T *  t,
int  increment