mirror of
https://github.com/klzgrad/naiveproxy.git
synced 2024-11-24 06:16:30 +03:00
process: Remove use of mallinfo for Musl
This commit is contained in:
parent
5ece33830d
commit
cd949bb531
@ -111,6 +111,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
|
||||
@ -122,6 +125,7 @@ size_t GetMallocUsageMallinfo() {
|
||||
#endif
|
||||
#undef MALLINFO2_FOUND_IN_LIBC
|
||||
return checked_cast<size_t>(minfo.hblkhd + minfo.arena);
|
||||
#endif
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
Loading…
Reference in New Issue
Block a user