/usr/include/boost/align/detail
NameSizeModeActions
add_reference.hpp7980644editdlrm
align.hpp8430644editdlrm
aligned_alloc.hpp11850644editdlrm
aligned_alloc_android.hpp6990644editdlrm
aligned_alloc_macos.hpp8800644editdlrm
aligned_alloc_mingw.hpp7250644editdlrm
aligned_alloc_msvc.hpp7090644editdlrm
aligned_alloc_new.hpp12140644editdlrm
aligned_alloc_posix.hpp8350644editdlrm
aligned_alloc_sunos.hpp6950644editdlrm
alignment_of.hpp5970644editdlrm
alignment_of_clang.hpp5460644editdlrm
alignment_of_codegear.hpp5500644editdlrm
alignment_of_cxx11.hpp4290644editdlrm
alignment_of_gcc.hpp5440644editdlrm
alignment_of_msvc.hpp6270644editdlrm
align_cxx11.hpp3690644editdlrm
align_down.hpp6330644editdlrm
align_up.hpp6450644editdlrm
assume_aligned.hpp4010644editdlrm
assume_aligned_clang.hpp4860644editdlrm
assume_aligned_gcc.hpp4700644editdlrm
assume_aligned_intel.hpp4520644editdlrm
assume_aligned_msvc.hpp5050644editdlrm
element_type.hpp16590644editdlrm
integral_constant.hpp11670644editdlrm
is_aligned.hpp8350644editdlrm
is_alignment.hpp5510644editdlrm
is_alignment_constant.hpp5790644editdlrm
max_align.hpp5630644editdlrm
max_objects.hpp5670644editdlrm
max_size.hpp5510644editdlrm
min_size.hpp5460644editdlrm
not_pointer.hpp4960644editdlrm
throw_exception.hpp8220644editdlrm
Edit: /usr/include/boost/align/detail/aligned_alloc.hpp (1185B)
/* Copyright 2014-2015 Glen Joseph Fernandes (glenjofe@gmail.com) Distributed under the Boost Software License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt) */ #ifndef BOOST_ALIGN_DETAIL_ALIGNED_ALLOC_HPP #define BOOST_ALIGN_DETAIL_ALIGNED_ALLOC_HPP #include #include #include #include #include namespace boost { namespace alignment { inline void* aligned_alloc(std::size_t alignment, std::size_t size) BOOST_NOEXCEPT { BOOST_ASSERT(detail::is_alignment(alignment)); enum { N = alignment_of::value }; if (alignment < N) { alignment = N; } std::size_t n = size + alignment - N; void* p = std::malloc(sizeof(void*) + n); if (p) { void* r = static_cast(p) + sizeof(void*); (void)boost::alignment::align(alignment, size, r, n); *(static_cast(r) - 1) = p; p = r; } return p; } inline void aligned_free(void* ptr) BOOST_NOEXCEPT { if (ptr) { std::free(*(static_cast(ptr) - 1)); } } } /* alignment */ } /* boost */ #endif