Skip to content

Commit

Permalink
enigma: Mallinfo deprecated in glibc 2.33
Browse files Browse the repository at this point in the history
  • Loading branch information
athoik authored and Hains committed Mar 20, 2022
1 parent 475f8fa commit 48a05ce
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions main/enigma.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -355,8 +355,13 @@ const char *getBoxType()
void dump_malloc_stats(void)
{
#ifdef __GLIBC__
#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 33)
struct mallinfo2 mi = mallinfo2();
eDebug("MALLOC: %zu total", mi.uordblks);
#else
struct mallinfo mi = mallinfo();
eDebug("MALLOC: %d total", mi.uordblks);
#endif
#else
eDebug("MALLOC: info not exposed");
#endif
Expand Down

0 comments on commit 48a05ce

Please sign in to comment.