22 lines
576 B
Diff
22 lines
576 B
Diff
In musl libc there is no struct mallinfo and no function mallinf()
|
|
|
|
--- a/src/OSD/OSD_MemInfo.cxx.orig 2022-10-06 09:21:55.466236104 +0200
|
|
+++ b/src/OSD/OSD_MemInfo.cxx 2022-10-06 09:25:34.105323581 +0200
|
|
@@ -188,12 +188,16 @@ void OSD_MemInfo::Update()
|
|
#endif
|
|
#endif
|
|
|
|
+ #if defined(__GLIBC__)
|
|
#ifdef HAS_MALLINFO2
|
|
const struct mallinfo2 aMI = mallinfo2();
|
|
#else
|
|
const struct mallinfo aMI = mallinfo();
|
|
#endif
|
|
myCounters[MemHeapUsage] = aMI.uordblks;
|
|
+ #else
|
|
+ myCounters[MemHeapUsage] = 0;
|
|
+ #endif
|
|
}
|
|
|
|
if (!IsActive (MemVirtual)
|