ΒΆinline void* allocate_buffer(size_t Size,
                             size_t Alignment)

Description

Allocate a buffer of memory with the given size and alignment. When the compiler supports aligned operator new, this will use it to to handle even over-aligned allocations. However, this doesn't make any attempt to leverage the fancier techniques like posix_memalign due to portability. It is mostly intended to allow compatibility with platforms that, after aligned allocation was added, use reduced default alignment.

Declared at: llvm/include/llvm/Support/Compiler.h:557

Parameters

size_t Size
size_t Alignment