diff options
author | Harald Musum <musum@verizonmedia.com> | 2021-06-29 16:06:31 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-29 16:06:31 +0200 |
commit | 2baf0e8d284b0bd187425913ec4c6f1be1511511 (patch) | |
tree | f8052a48727388c0a3170f78040a81994ce26893 /searchcore | |
parent | 51dbf8ce94bcc590cfe640eeee7e5afc45ec5a5b (diff) |
Revert "Add support for mallinfo2 with glibc 2.33"
Diffstat (limited to 'searchcore')
-rw-r--r-- | searchcore/src/vespa/searchcore/proton/server/proton.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/searchcore/src/vespa/searchcore/proton/server/proton.cpp b/searchcore/src/vespa/searchcore/proton/server/proton.cpp index adae323c1d9..9c5438825b2 100644 --- a/searchcore/src/vespa/searchcore/proton/server/proton.cpp +++ b/searchcore/src/vespa/searchcore/proton/server/proton.cpp @@ -767,15 +767,15 @@ Proton::updateMetrics(const metrics::MetricLockGuard &) metrics.resourceUsage.openFileDescriptors.set(FastOS_File::count_open_files()); metrics.resourceUsage.feedingBlocked.set((usageFilter.acceptWriteOperation() ? 0.0 : 1.0)); #ifdef __linux__ +#pragma GCC diagnostic push #if __GLIBC_PREREQ(2, 33) - struct mallinfo2 mallocInfo = mallinfo2(); - metrics.resourceUsage.mallocArena.set(mallocInfo.arena); -#else +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" +#endif struct mallinfo mallocInfo = mallinfo(); +#pragma GCC diagnostic pop // Vespamalloc reports arena in 1M blocks as an 'int' is too small. // If we use something else than vespamalloc this must be changed. metrics.resourceUsage.mallocArena.set(uint64_t(mallocInfo.arena) * 1_Mi); -#endif #else metrics.resourceUsage.mallocArena.set(UINT64_C(0)); #endif |