2 (c) 2014 Glen Joseph Fernandes
3 <glenjofe -at- gmail.com>
5 Distributed under the Boost Software
7 http://boost.org/LICENSE_1_0.txt
9 #ifndef BOOST_ALIGN_DETAIL_ALIGNED_ALLOC_MACOS_HPP
10 #define BOOST_ALIGN_DETAIL_ALIGNED_ALLOC_MACOS_HPP
12 #include <boost/align/detail/is_alignment.hpp>
13 #include <boost/assert.hpp>
19 inline void* aligned_alloc(std::size_t alignment, std::size_t size)
22 BOOST_ASSERT(detail::is_alignment(alignment));
26 if (alignment < sizeof(void*)) {
27 alignment = sizeof(void*);
30 if (::posix_memalign(&p, alignment, size) != 0) {
36 inline void aligned_free(void* ptr) BOOST_NOEXCEPT