mirror of
https://github.com/matrix-construct/construct
synced 2024-12-26 15:33:54 +01:00
ircd::allocator: Support mallinfo2() for deprecated mallinfo(3) for GNU allocator.
This commit is contained in:
parent
b01772b4c6
commit
d36024cdb8
2 changed files with 9 additions and 1 deletions
|
@ -1272,6 +1272,8 @@ AC_CHECK_FUNCS([ \
|
||||||
backtrace \
|
backtrace \
|
||||||
fadvise \
|
fadvise \
|
||||||
madvise \
|
madvise \
|
||||||
|
mallinfo \
|
||||||
|
mallinfo2 \
|
||||||
mlock \
|
mlock \
|
||||||
mlock2 \
|
mlock2 \
|
||||||
mmap \
|
mmap \
|
||||||
|
|
|
@ -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];
|
||||||
|
|
Loading…
Reference in a new issue