diff options
author | David Goulet <dgoulet@torproject.org> | 2021-02-23 12:28:04 -0500 |
---|---|---|
committer | David Goulet <dgoulet@torproject.org> | 2021-02-23 12:28:04 -0500 |
commit | 6edb648aa0f23a507e7557a07fd291d6c3ad7747 (patch) | |
tree | bd1ab4312312873768a0b6aeb6dc5bec81fafb88 /src/lib | |
parent | bc799a1eaf85fc218156e014c83cc1d5c096e16a (diff) | |
parent | 97e51dd01b228ecb72c912c6cf3ffae6334c8d07 (diff) | |
download | tor-6edb648aa0f23a507e7557a07fd291d6c3ad7747.tar.gz tor-6edb648aa0f23a507e7557a07fd291d6c3ad7747.zip |
Merge branch 'maint-0.4.5'
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/meminfo/meminfo.c | 23 | ||||
-rw-r--r-- | src/lib/meminfo/meminfo.h | 1 |
2 files changed, 0 insertions, 24 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 diff --git a/src/lib/meminfo/meminfo.h b/src/lib/meminfo/meminfo.h index a5ebfd5a6a..36a85c133d 100644 --- a/src/lib/meminfo/meminfo.h +++ b/src/lib/meminfo/meminfo.h @@ -15,7 +15,6 @@ #include "lib/testsupport/testsupport.h" #include <stddef.h> -void tor_log_mallinfo(int severity); MOCK_DECL(int, get_total_system_memory, (size_t *mem_out)); #endif /* !defined(TOR_MEMINFO_H) */ |