process: Remove use of mallinfo under Musl

This commit is contained in:
klzgrad 2019-11-30 22:37:05 +08:00
parent d02d534659
commit 9f9614b377

View File

@ -109,6 +109,9 @@ void IncreaseFdLimitTo(unsigned int max_descriptors) {
namespace {
size_t GetMallocUsageMallinfo() {
#if defined(OS_LINUX) && defined(__UCLIBC__)
return 0;
#else
#if defined(__GLIBC__) && defined(__GLIBC_PREREQ)
#if __GLIBC_PREREQ(2, 33)
#define MALLINFO2_FOUND_IN_LIBC
@ -124,6 +127,7 @@ size_t GetMallocUsageMallinfo() {
#else
return minfo.hblkhd + minfo.arena;
#endif
#endif
}
} // namespace