MySQL 8.0.39
Source Code Documentation
|
Functions | |
void * | my_aligned_malloc (size_t size, size_t alignment) |
Function allocates size bytes and returns a pointer to the allocated memory. More... | |
void | my_aligned_free (void *ptr) |
Free allocated memory using my_aligned_malloc function. More... | |
void my_aligned_free | ( | void * | ptr | ) |
Free allocated memory using my_aligned_malloc function.
[in] | ptr | Pointer to allocated memory using my_aligned_malloc function. |
void * my_aligned_malloc | ( | size_t | size, |
size_t | alignment | ||
) |
Function allocates size bytes and returns a pointer to the allocated memory.
Size and alignment parameters depend on platform on which the function is executed. Please check posix_memalign, memalign and _aligned_malloc functions for details. To conform with all platforms size should be multiple of aligment and aligment should be power of two.
We can use C++17 aligned new/aligned delete on non-windows platforms once the minimum supported version of tcmalloc becomes >= 2.6.2. Right now TC malloc crashes.
[in] | size | Multiple of alignment. |
[in] | alignment | Memory aligment, which must be power of two. |