/
usr
/
include
/
boost
/
align
/
detail
/
/usr/include/boost/align/detail
mkdir
upload
Name
Size
Mode
Actions
add_reference.hpp
798
0644
edit
dl
rm
align.hpp
843
0644
edit
dl
rm
aligned_alloc.hpp
1185
0644
edit
dl
rm
aligned_alloc_android.hpp
699
0644
edit
dl
rm
aligned_alloc_macos.hpp
880
0644
edit
dl
rm
aligned_alloc_mingw.hpp
725
0644
edit
dl
rm
aligned_alloc_msvc.hpp
709
0644
edit
dl
rm
aligned_alloc_new.hpp
1214
0644
edit
dl
rm
aligned_alloc_posix.hpp
835
0644
edit
dl
rm
aligned_alloc_sunos.hpp
695
0644
edit
dl
rm
alignment_of.hpp
597
0644
edit
dl
rm
alignment_of_clang.hpp
546
0644
edit
dl
rm
alignment_of_codegear.hpp
550
0644
edit
dl
rm
alignment_of_cxx11.hpp
429
0644
edit
dl
rm
alignment_of_gcc.hpp
544
0644
edit
dl
rm
alignment_of_msvc.hpp
627
0644
edit
dl
rm
align_cxx11.hpp
369
0644
edit
dl
rm
align_down.hpp
633
0644
edit
dl
rm
align_up.hpp
645
0644
edit
dl
rm
assume_aligned.hpp
401
0644
edit
dl
rm
assume_aligned_clang.hpp
486
0644
edit
dl
rm
assume_aligned_gcc.hpp
470
0644
edit
dl
rm
assume_aligned_intel.hpp
452
0644
edit
dl
rm
assume_aligned_msvc.hpp
505
0644
edit
dl
rm
element_type.hpp
1659
0644
edit
dl
rm
integral_constant.hpp
1167
0644
edit
dl
rm
is_aligned.hpp
835
0644
edit
dl
rm
is_alignment.hpp
551
0644
edit
dl
rm
is_alignment_constant.hpp
579
0644
edit
dl
rm
max_align.hpp
563
0644
edit
dl
rm
max_objects.hpp
567
0644
edit
dl
rm
max_size.hpp
551
0644
edit
dl
rm
min_size.hpp
546
0644
edit
dl
rm
not_pointer.hpp
496
0644
edit
dl
rm
throw_exception.hpp
822
0644
edit
dl
rm
Edit:
/usr/include/boost/align/detail/aligned_alloc_macos.hpp
(880B)
/* Copyright 2014 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_MACOS_HPP #define BOOST_ALIGN_DETAIL_ALIGNED_ALLOC_MACOS_HPP #include <boost/align/detail/is_alignment.hpp> #include <boost/assert.hpp> #include <stdlib.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)); if (size == 0) { return 0; } if (alignment < sizeof(void*)) { alignment = sizeof(void*); } void* p; if (::posix_memalign(&p, alignment, size) != 0) { p = 0; } return p; } inline void aligned_free(void* ptr) BOOST_NOEXCEPT { ::free(ptr); } } /* alignment */ } /* boost */ #endif
Save
cmd:
run