0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-06-17 17:38:22 +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 \ backtrace \
fadvise \ fadvise \
madvise \ madvise \
mallinfo \
mallinfo2 \
mlock \ mlock \
mlock2 \ mlock2 \
mmap \ mmap \

View file

@ -47,7 +47,13 @@ ircd::allocator::info(const mutable_buffer &buf,
const auto ma const auto ma
{ {
::mallinfo() #if defined(HAVE_MALLINFO2)
::mallinfo2()
#elif defined(HAVE_MALLINFO)
::mallinfo2()
#else
#error "Missing mallinfo(3)."
#endif
}; };
char pbuf[96]; char pbuf[96];