File indexing completed on 2025-01-18 09:28:26
0001
0002
0003
0004
0005
0006
0007
0008 #ifndef BOOST_ALIGN_DETAIL_ALIGNED_ALLOC_ANDROID_HPP
0009 #define BOOST_ALIGN_DETAIL_ALIGNED_ALLOC_ANDROID_HPP
0010
0011 #include <boost/align/detail/is_alignment.hpp>
0012 #include <boost/assert.hpp>
0013 #include <malloc.h>
0014
0015 namespace boost {
0016 namespace alignment {
0017
0018 inline void*
0019 aligned_alloc(std::size_t alignment, std::size_t size) BOOST_NOEXCEPT
0020 {
0021 BOOST_ASSERT(detail::is_alignment(alignment));
0022 return ::memalign(alignment, size);
0023 }
0024
0025 inline void
0026 aligned_free(void* ptr) BOOST_NOEXCEPT
0027 {
0028 ::free(ptr);
0029 }
0030
0031 }
0032 }
0033
0034 #endif