This library provides function align for implementations which do not have the C++11 standard library align function available.It
provides allocation functions aligned_alloc and aligned_free as their
functionality is not yet available in the C++ standard library. They use
platform specific functions, if available, or use standard library
functions in conjunction with align.It
provides C++ allocators, class templates aligned_allocator and
aligned_allocator_adaptor, which respect alignment. The first uses
aligned_alloc and aligned_free while the second uses the allocator in
conjunction with align.It also provides function is_aligned to test the alignment of a pointer.
added the ability to specify increased alignment (over-alignment) for
class types. Unfortunately, ::operator new allocation functions, new
expressions, and the default allocator, std::allocator, do not support
dynamic memory allocation of over-aligned data.
The aligned_alloc function can be used in place of ::operator new to specify the alignment of the memory allocated.The aligned_allocator class template can be used in place of std::allocator as an alignment-aware default allocator.The aligned_allocator_adaptor class template can be used to adapt any allocator into an alignment-aware allocator.
The functionality provided by this library addresses needs
in existing Boost libraries as well. Boost.SmartPtr has its own
implementation of align, and Boost.Log and Boost.Interprocess have their
own implementations of aligned_alloc and aligned_free.