diff options
author | Alessio Vanni <vannilla@firemail.cc> | 2021-11-11 21:45:15 +0100 |
---|---|---|
committer | Alessio Vanni <vannilla@firemail.cc> | 2021-11-21 18:42:34 +0100 |
commit | f503b79a9d125249884cd46c9ee04638e3865f93 (patch) | |
tree | 499b19bead10893de02f4632e2804d4a83f94575 | |
parent | 20ffa0aa543853fb0d395167fb0a090c0e369db0 (diff) | |
download | gnunet-f503b79a9d125249884cd46c9ee04638e3865f93.tar.gz gnunet-f503b79a9d125249884cd46c9ee04638e3865f93.zip |
-mallinfo is deprecated in favour of mallinfo2
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | src/statistics/statistics_api.c | 6 | ||||
-rw-r--r-- | src/transport/tcp_service_legacy.c | 14 | ||||
-rw-r--r-- | src/util/service.c | 8 |
4 files changed, 15 insertions, 15 deletions
diff --git a/configure.ac b/configure.ac index 0ea55a90f..5c6fedc8c 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -1152,7 +1152,7 @@ AC_FUNC_FORK | |||
1152 | AC_FUNC_CHOWN | 1152 | AC_FUNC_CHOWN |
1153 | AC_CHECK_FUNCS([atoll stat64 strnlen mremap getrlimit setrlimit sysconf | 1153 | AC_CHECK_FUNCS([atoll stat64 strnlen mremap getrlimit setrlimit sysconf |
1154 | initgroups strndup gethostbyname2 getpeerucred getpeereid | 1154 | initgroups strndup gethostbyname2 getpeerucred getpeereid |
1155 | setresuid getifaddrs freeifaddrs getresgid mallinfo malloc_size | 1155 | setresuid getifaddrs freeifaddrs getresgid mallinfo2 malloc_size |
1156 | malloc_usable_size getrusage random srandom stat statfs statvfs | 1156 | malloc_usable_size getrusage random srandom stat statfs statvfs |
1157 | wait4 timegm]) | 1157 | wait4 timegm]) |
1158 | 1158 | ||
diff --git a/src/statistics/statistics_api.c b/src/statistics/statistics_api.c index d6c2680b8..6e6acb3e5 100644 --- a/src/statistics/statistics_api.c +++ b/src/statistics/statistics_api.c | |||
@@ -270,11 +270,11 @@ update_memory_statistics (struct GNUNET_STATISTICS_Handle *h) | |||
270 | 270 | ||
271 | if (GNUNET_NO != h->do_destroy) | 271 | if (GNUNET_NO != h->do_destroy) |
272 | return; | 272 | return; |
273 | #if HAVE_MALLINFO | 273 | #if HAVE_MALLINFO2 |
274 | { | 274 | { |
275 | struct mallinfo mi; | 275 | struct mallinfo2 mi; |
276 | 276 | ||
277 | mi = mallinfo (); | 277 | mi = mallinfo2 (); |
278 | current_heap_size = mi.uordblks + mi.fordblks; | 278 | current_heap_size = mi.uordblks + mi.fordblks; |
279 | } | 279 | } |
280 | #endif | 280 | #endif |
diff --git a/src/transport/tcp_service_legacy.c b/src/transport/tcp_service_legacy.c index 8606b353b..65b090187 100644 --- a/src/transport/tcp_service_legacy.c +++ b/src/transport/tcp_service_legacy.c | |||
@@ -29,7 +29,7 @@ | |||
29 | #include "gnunet_constants.h" | 29 | #include "gnunet_constants.h" |
30 | #include "gnunet_resolver_service.h" | 30 | #include "gnunet_resolver_service.h" |
31 | 31 | ||
32 | #if HAVE_MALLINFO | 32 | #if HAVE_MALLINFO2 |
33 | #include <malloc.h> | 33 | #include <malloc.h> |
34 | #include "gauger.h" | 34 | #include "gauger.h" |
35 | #endif | 35 | #endif |
@@ -1450,7 +1450,7 @@ shutdown: | |||
1450 | LOG_STRERROR (GNUNET_ERROR_TYPE_WARNING, "write"); | 1450 | LOG_STRERROR (GNUNET_ERROR_TYPE_WARNING, "write"); |
1451 | GNUNET_break (0 == close (sctx.ready_confirm_fd)); | 1451 | GNUNET_break (0 == close (sctx.ready_confirm_fd)); |
1452 | } | 1452 | } |
1453 | #if HAVE_MALLINFO | 1453 | #if HAVE_MALLINFO2 |
1454 | { | 1454 | { |
1455 | char *counter; | 1455 | char *counter; |
1456 | 1456 | ||
@@ -1462,9 +1462,9 @@ shutdown: | |||
1462 | "GAUGER_HEAP", | 1462 | "GAUGER_HEAP", |
1463 | &counter))) | 1463 | &counter))) |
1464 | { | 1464 | { |
1465 | struct mallinfo mi; | 1465 | struct mallinfo2 mi; |
1466 | 1466 | ||
1467 | mi = mallinfo (); | 1467 | mi = mallinfo2 (); |
1468 | GAUGER (service_name, counter, mi.usmblks, "blocks"); | 1468 | GAUGER (service_name, counter, mi.usmblks, "blocks"); |
1469 | GNUNET_free (counter); | 1469 | GNUNET_free (counter); |
1470 | } | 1470 | } |
@@ -1599,7 +1599,7 @@ LEGACY_SERVICE_stop (struct LEGACY_SERVICE_Context *sctx) | |||
1599 | { | 1599 | { |
1600 | unsigned int i; | 1600 | unsigned int i; |
1601 | 1601 | ||
1602 | #if HAVE_MALLINFO | 1602 | #if HAVE_MALLINFO2 |
1603 | { | 1603 | { |
1604 | char *counter; | 1604 | char *counter; |
1605 | 1605 | ||
@@ -1611,9 +1611,9 @@ LEGACY_SERVICE_stop (struct LEGACY_SERVICE_Context *sctx) | |||
1611 | "GAUGER_HEAP", | 1611 | "GAUGER_HEAP", |
1612 | &counter))) | 1612 | &counter))) |
1613 | { | 1613 | { |
1614 | struct mallinfo mi; | 1614 | struct mallinfo2 mi; |
1615 | 1615 | ||
1616 | mi = mallinfo (); | 1616 | mi = mallinfo2 (); |
1617 | GAUGER (sctx->service_name, counter, mi.usmblks, "blocks"); | 1617 | GAUGER (sctx->service_name, counter, mi.usmblks, "blocks"); |
1618 | GNUNET_free (counter); | 1618 | GNUNET_free (counter); |
1619 | } | 1619 | } |
diff --git a/src/util/service.c b/src/util/service.c index 4c647430d..df4feb0ec 100644 --- a/src/util/service.c +++ b/src/util/service.c | |||
@@ -31,7 +31,7 @@ | |||
31 | #include "gnunet_resolver_service.h" | 31 | #include "gnunet_resolver_service.h" |
32 | #include "speedup.h" | 32 | #include "speedup.h" |
33 | 33 | ||
34 | #if HAVE_MALLINFO | 34 | #if HAVE_MALLINFO2 |
35 | #include <malloc.h> | 35 | #include <malloc.h> |
36 | #include "gauger.h" | 36 | #include "gauger.h" |
37 | #endif | 37 | #endif |
@@ -2140,7 +2140,7 @@ shutdown: | |||
2140 | LOG_STRERROR (GNUNET_ERROR_TYPE_WARNING, "write"); | 2140 | LOG_STRERROR (GNUNET_ERROR_TYPE_WARNING, "write"); |
2141 | GNUNET_break (0 == close (sh.ready_confirm_fd)); | 2141 | GNUNET_break (0 == close (sh.ready_confirm_fd)); |
2142 | } | 2142 | } |
2143 | #if HAVE_MALLINFO | 2143 | #if HAVE_MALLINFO2 |
2144 | { | 2144 | { |
2145 | char *counter; | 2145 | char *counter; |
2146 | 2146 | ||
@@ -2152,9 +2152,9 @@ shutdown: | |||
2152 | "GAUGER_HEAP", | 2152 | "GAUGER_HEAP", |
2153 | &counter))) | 2153 | &counter))) |
2154 | { | 2154 | { |
2155 | struct mallinfo mi; | 2155 | struct mallinfo2 mi; |
2156 | 2156 | ||
2157 | mi = mallinfo (); | 2157 | mi = mallinfo2 (); |
2158 | GAUGER (service_name, counter, mi.usmblks, "blocks"); | 2158 | GAUGER (service_name, counter, mi.usmblks, "blocks"); |
2159 | GNUNET_free (counter); | 2159 | GNUNET_free (counter); |
2160 | } | 2160 | } |