mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-09-01 09:51:13 +02:00
Fix malloc_stats() call for newer uClibc-ng versions
Origin commit data
------------------
Branch: ni/coolstream
Commit: b58aa9ad6f
Author: Michael Liebmann <tuxcode.bbg@gmail.com>
Date: 2017-03-08 (Wed, 08 Mar 2017)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -55,6 +55,16 @@
|
||||
#include "xmlutil.h"
|
||||
#include "debug.h"
|
||||
|
||||
#ifdef __UCLIBC__
|
||||
#if (__UCLIBC_MAJOR__ >= 1) && (__UCLIBC_MINOR__ >= 0) && (__UCLIBC_SUBLEVEL__ >= 10)
|
||||
#define MALLOC_STATS(a) malloc_stats()
|
||||
#else
|
||||
#define MALLOC_STATS(a) malloc_stats(a)
|
||||
#endif
|
||||
#else
|
||||
#define MALLOC_STATS(a) malloc_stats()
|
||||
#endif
|
||||
|
||||
//#define ENABLE_SDT //FIXME
|
||||
|
||||
//#define DEBUG_SDT_THREAD
|
||||
@@ -1067,11 +1077,7 @@ static void commandDumpStatusInformation(int /*connfd*/, char* /*data*/, const u
|
||||
// resourceUsage.ru_maxrss, resourceUsage.ru_ixrss, resourceUsage.ru_idrss, resourceUsage.ru_isrss,
|
||||
);
|
||||
printf("%s\n", stati);
|
||||
#ifdef __UCLIBC__
|
||||
malloc_stats(NULL);
|
||||
#else
|
||||
malloc_stats();
|
||||
#endif
|
||||
MALLOC_STATS(NULL);
|
||||
return ;
|
||||
}
|
||||
|
||||
@@ -1200,11 +1206,7 @@ static void FreeMemory()
|
||||
|
||||
unlockEvents();
|
||||
|
||||
#ifdef __UCLIBC__
|
||||
malloc_stats(NULL);
|
||||
#else
|
||||
malloc_stats();
|
||||
#endif
|
||||
MALLOC_STATS(NULL);
|
||||
xprintf("[sectionsd] free memory done\n");
|
||||
//wakeupAll(); //FIXME should we re-start eit here ?
|
||||
}
|
||||
@@ -2054,11 +2056,7 @@ static void print_meminfo(void)
|
||||
if (!sections_debug)
|
||||
return;
|
||||
|
||||
#ifdef __UCLIBC__
|
||||
malloc_stats(NULL);
|
||||
#else
|
||||
malloc_stats();
|
||||
#endif
|
||||
MALLOC_STATS(NULL);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------
|
||||
|
Reference in New Issue
Block a user