--- a/include/libtorrent/aux_/buffer.hpp +++ b/include/libtorrent/aux_/buffer.hpp @@ -87,17 +87,7 @@ public: m_begin = static_cast(std::malloc(static_cast(size))); if (m_begin == nullptr) aux::throw_ex(); - // the actual allocation may be larger than we requested. If so, let the - // user take advantage of every single byte -#if (defined __GLIBC__ && !defined __UCLIBC__) || defined __FreeBSD__ - m_size = static_cast(::malloc_usable_size(m_begin)); -#elif defined _MSC_VER - m_size = static_cast(::_msize(m_begin)); -#elif defined __APPLE__ - m_size = static_cast(::malloc_size(m_begin)); -#else m_size = size; -#endif } // allocate an uninitialized buffer of the specified size