diff options
author | David Goulet <dgoulet@torproject.org> | 2021-02-23 11:02:33 -0500 |
---|---|---|
committer | David Goulet <dgoulet@torproject.org> | 2021-02-23 12:16:58 -0500 |
commit | ad4f87ed3f2126814e42565e2d815e37f99f7c1f (patch) | |
tree | a6004718e3da168a755a2afd33a45c1caad10594 /src/lib/meminfo/meminfo.c | |
parent | 49c61c1bb85fa557a6a47f41cfab435a82a6d82f (diff) | |
download | tor-ad4f87ed3f2126814e42565e2d815e37f99f7c1f.tar.gz tor-ad4f87ed3f2126814e42565e2d815e37f99f7c1f.zip |
Remove mallinfo() from codebase
Now deprecated in libc >= 2.33
Closes #40309
Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/lib/meminfo/meminfo.c')
-rw-r--r-- | src/lib/meminfo/meminfo.c | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/src/lib/meminfo/meminfo.c b/src/lib/meminfo/meminfo.c index 0c5e0ed665..b7d991e410 100644 --- a/src/lib/meminfo/meminfo.c +++ b/src/lib/meminfo/meminfo.c @@ -37,29 +37,6 @@ #include <sys/sysctl.h> #endif -DISABLE_GCC_WARNING("-Waggregate-return") -/** Call the platform malloc info function, and dump the results to the log at - * level <b>severity</b>. If no such function exists, do nothing. */ -void -tor_log_mallinfo(int severity) -{ -#ifdef HAVE_MALLINFO - struct mallinfo mi; - memset(&mi, 0, sizeof(mi)); - mi = mallinfo(); - tor_log(severity, LD_MM, - "mallinfo() said: arena=%d, ordblks=%d, smblks=%d, hblks=%d, " - "hblkhd=%d, usmblks=%d, fsmblks=%d, uordblks=%d, fordblks=%d, " - "keepcost=%d", - mi.arena, mi.ordblks, mi.smblks, mi.hblks, - mi.hblkhd, mi.usmblks, mi.fsmblks, mi.uordblks, mi.fordblks, - mi.keepcost); -#else /* !defined(HAVE_MALLINFO) */ - (void)severity; -#endif /* defined(HAVE_MALLINFO) */ -} -ENABLE_GCC_WARNING("-Waggregate-return") - #if defined(HW_PHYSMEM64) /* OpenBSD and NetBSD define this */ #define INT64_HW_MEM HW_PHYSMEM64 |