/*
* palloc_aligned
* Allocate 'size' bytes returning a pointer that's aligned to the
* 'alignto' boundary.
*
* Currently, we align addresses by requesting additional bytes from the
* MemoryContext's standard allocator function and then aligning the returned
* address by the required alignment. This means that the given MemoryContext
* must support providing us with a chunk of memory that's larger than 'size'.
* For allocators such as Slab, that's not going to work, as slab only allows
* chunks of the size that's specified when the context is created.
*
* 'alignto' must be a power of 2.
* 'flags' may be 0 or set the same as MemoryContextAllocExtended().
*/
void *
palloc_aligned(Size size, Size alignto, int flags)
https://perconadev.atlassian.net/browse/PG-1039