From 25a6bbdcbcda16864c45aa7ccf817d96714d54e8 Mon Sep 17 00:00:00 2001 From: klzgrad Date: Sat, 30 Nov 2019 22:37:05 +0800 Subject: [PATCH] process: Remove use of mallinfo for Musl --- src/base/process/process_metrics_posix.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/base/process/process_metrics_posix.cc b/src/base/process/process_metrics_posix.cc index a836cdc39d..01f3169931 100644 --- a/src/base/process/process_metrics_posix.cc +++ b/src/base/process/process_metrics_posix.cc @@ -110,6 +110,9 @@ void IncreaseFdLimitTo(unsigned int max_descriptors) { namespace { size_t GetMallocUsageMallinfo() { +#if defined(__MUSL__) + return 0; +#else #if defined(__GLIBC__) && defined(__GLIBC_PREREQ) #if __GLIBC_PREREQ(2, 33) #define MALLINFO2_FOUND_IN_LIBC @@ -121,6 +124,7 @@ size_t GetMallocUsageMallinfo() { #endif #undef MALLINFO2_FOUND_IN_LIBC return checked_cast(minfo.hblkhd + minfo.arena); +#endif } } // namespace