diff options
author | DongHun Kwak <dh0128.kwak@samsung.com> | 2016-10-06 10:30:07 +0900 |
---|---|---|
committer | DongHun Kwak <dh0128.kwak@samsung.com> | 2016-10-06 10:32:57 +0900 |
commit | 71d216b90256936a9638f325af9bc69d720e75de (patch) | |
tree | 9c5f682d341c7c88ad0c8e3d4b262e00b6fb691a /boost/align/detail/aligned_alloc_android.hpp | |
parent | 733b5d5ae2c5d625211e2985ac25728ac3f54883 (diff) | |
download | boost-71d216b90256936a9638f325af9bc69d720e75de.tar.gz boost-71d216b90256936a9638f325af9bc69d720e75de.tar.bz2 boost-71d216b90256936a9638f325af9bc69d720e75de.zip |
Imported Upstream version 1.59.0
Change-Id: I2dde00f4eca71df3eea9d251dcaecde18a6c90a5
Signed-off-by: DongHun Kwak <dh0128.kwak@samsung.com>
Diffstat (limited to 'boost/align/detail/aligned_alloc_android.hpp')
-rw-r--r-- | boost/align/detail/aligned_alloc_android.hpp | 37 |
1 files changed, 19 insertions, 18 deletions
diff --git a/boost/align/detail/aligned_alloc_android.hpp b/boost/align/detail/aligned_alloc_android.hpp index 2b813becae..d97d67989e 100644 --- a/boost/align/detail/aligned_alloc_android.hpp +++ b/boost/align/detail/aligned_alloc_android.hpp @@ -1,10 +1,10 @@ /* - (c) 2014 Glen Joseph Fernandes - glenjofe at gmail dot com +(c) 2014 Glen Joseph Fernandes +glenjofe at gmail dot com - Distributed under the Boost Software - License, Version 1.0. - http://boost.org/LICENSE_1_0.txt +Distributed under the Boost Software +License, Version 1.0. +http://boost.org/LICENSE_1_0.txt */ #ifndef BOOST_ALIGN_DETAIL_ALIGNED_ALLOC_ANDROID_HPP #define BOOST_ALIGN_DETAIL_ALIGNED_ALLOC_ANDROID_HPP @@ -16,20 +16,21 @@ #include <malloc.h> namespace boost { - namespace alignment { - inline void* aligned_alloc(std::size_t alignment, - std::size_t size) BOOST_NOEXCEPT - { - BOOST_ASSERT(detail::is_alignment(alignment)); - return ::memalign(alignment, size); - } +namespace alignment { - inline void aligned_free(void* ptr) - BOOST_NOEXCEPT - { - ::free(ptr); - } - } +inline void* aligned_alloc(std::size_t alignment, std::size_t size) + BOOST_NOEXCEPT +{ + BOOST_ASSERT(detail::is_alignment(alignment)); + return ::memalign(alignment, size); } +inline void aligned_free(void* ptr) BOOST_NOEXCEPT +{ + ::free(ptr); +} + +} /* :alignment */ +} /* :boost */ + #endif |