0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-05-18 10:53:48 +02:00

ircd::allocator: Support mallinfo2() for deprecated mallinfo(3) for GNU allocator.

This commit is contained in:
Jason Volk 2022-06-20 17:51:46 -07:00
parent b01772b4c6
commit d36024cdb8
2 changed files with 9 additions and 1 deletions

View file

@ -1272,6 +1272,8 @@ AC_CHECK_FUNCS([ \
backtrace \
fadvise \
madvise \
mallinfo \
mallinfo2 \
mlock \
mlock2 \
mmap \

View file

@ -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];