mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-10 18:51:21 +03:00
0032319: Foundation Classes, OSD_MemInfo - use mallinfo2() instead of deprecated mallinfo()
This commit is contained in:
parent
fd2efe5428
commit
376d374d1f
@ -182,7 +182,17 @@ void OSD_MemInfo::Update()
|
|||||||
#elif (defined(__linux__) || defined(__linux))
|
#elif (defined(__linux__) || defined(__linux))
|
||||||
if (IsActive (MemHeapUsage))
|
if (IsActive (MemHeapUsage))
|
||||||
{
|
{
|
||||||
|
#if defined(__GLIBC__) && defined(__GLIBC_PREREQ)
|
||||||
|
#if __GLIBC_PREREQ(2,33)
|
||||||
|
#define HAS_MALLINFO2
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAS_MALLINFO2
|
||||||
|
const struct mallinfo2 aMI = mallinfo2();
|
||||||
|
#else
|
||||||
const struct mallinfo aMI = mallinfo();
|
const struct mallinfo aMI = mallinfo();
|
||||||
|
#endif
|
||||||
myCounters[MemHeapUsage] = aMI.uordblks;
|
myCounters[MemHeapUsage] = aMI.uordblks;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user