mirror of
https://github.com/klzgrad/naiveproxy.git
synced 2025-04-12 21:51:01 +00:00
process: Remove use of mallinfo under Musl
This commit is contained in:
parent
da3b0ecbfd
commit
18a3f713cc
1 changed files with 4 additions and 0 deletions
|
@ -109,6 +109,9 @@ void IncreaseFdLimitTo(unsigned int max_descriptors) {
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
size_t GetMallocUsageMallinfo() {
|
size_t GetMallocUsageMallinfo() {
|
||||||
|
#if defined(OS_LINUX) && defined(__UCLIBC__)
|
||||||
|
return 0;
|
||||||
|
#else
|
||||||
#if defined(__GLIBC__) && defined(__GLIBC_PREREQ)
|
#if defined(__GLIBC__) && defined(__GLIBC_PREREQ)
|
||||||
#if __GLIBC_PREREQ(2, 33)
|
#if __GLIBC_PREREQ(2, 33)
|
||||||
#define MALLINFO2_FOUND_IN_LIBC
|
#define MALLINFO2_FOUND_IN_LIBC
|
||||||
|
@ -124,6 +127,7 @@ size_t GetMallocUsageMallinfo() {
|
||||||
#else
|
#else
|
||||||
return minfo.hblkhd + minfo.arena;
|
return minfo.hblkhd + minfo.arena;
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
Loading…
Add table
Reference in a new issue