diff --git a/configure.ac b/configure.ac index fd4b940bb..a811138ca 100644 --- a/configure.ac +++ b/configure.ac @@ -1272,6 +1272,8 @@ AC_CHECK_FUNCS([ \ backtrace \ fadvise \ madvise \ + mallinfo \ + mallinfo2 \ mlock \ mlock2 \ mmap \ diff --git a/ircd/allocator_gnu.cc b/ircd/allocator_gnu.cc index a79a7c563..68494daff 100644 --- a/ircd/allocator_gnu.cc +++ b/ircd/allocator_gnu.cc @@ -47,7 +47,13 @@ ircd::allocator::info(const mutable_buffer &buf, const auto ma { - ::mallinfo() + #if defined(HAVE_MALLINFO2) + ::mallinfo2() + #elif defined(HAVE_MALLINFO) + ::mallinfo2() + #else + #error "Missing mallinfo(3)." + #endif }; char pbuf[96];