mirror of
https://github.com/klzgrad/naiveproxy.git
synced 2024-11-23 22:06:12 +03:00
process: Remove use of mallinfo for Musl
This commit is contained in:
parent
bcd3f45343
commit
6f44ed3eb1
@ -109,6 +109,9 @@ void IncreaseFdLimitTo(unsigned int max_descriptors) {
|
|||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
size_t GetMallocUsageMallinfo() {
|
size_t GetMallocUsageMallinfo() {
|
||||||
|
#if defined(__MUSL__)
|
||||||
|
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
|
||||||
@ -120,6 +123,7 @@ size_t GetMallocUsageMallinfo() {
|
|||||||
#endif
|
#endif
|
||||||
#undef MALLINFO2_FOUND_IN_LIBC
|
#undef MALLINFO2_FOUND_IN_LIBC
|
||||||
return minfo.hblkhd + minfo.arena;
|
return minfo.hblkhd + minfo.arena;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
Loading…
Reference in New Issue
Block a user