mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-30 08:51:10 +02:00
Fix malloc_stats() call for newer uClibc-ng versions
This commit is contained in:
@@ -55,6 +55,16 @@
|
|||||||
#include "xmlutil.h"
|
#include "xmlutil.h"
|
||||||
#include "debug.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 ENABLE_SDT //FIXME
|
||||||
|
|
||||||
//#define DEBUG_SDT_THREAD
|
//#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,
|
// resourceUsage.ru_maxrss, resourceUsage.ru_ixrss, resourceUsage.ru_idrss, resourceUsage.ru_isrss,
|
||||||
);
|
);
|
||||||
printf("%s\n", stati);
|
printf("%s\n", stati);
|
||||||
#ifdef __UCLIBC__
|
MALLOC_STATS(NULL);
|
||||||
malloc_stats(NULL);
|
|
||||||
#else
|
|
||||||
malloc_stats();
|
|
||||||
#endif
|
|
||||||
return ;
|
return ;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1200,11 +1206,7 @@ static void FreeMemory()
|
|||||||
|
|
||||||
unlockEvents();
|
unlockEvents();
|
||||||
|
|
||||||
#ifdef __UCLIBC__
|
MALLOC_STATS(NULL);
|
||||||
malloc_stats(NULL);
|
|
||||||
#else
|
|
||||||
malloc_stats();
|
|
||||||
#endif
|
|
||||||
xprintf("[sectionsd] free memory done\n");
|
xprintf("[sectionsd] free memory done\n");
|
||||||
//wakeupAll(); //FIXME should we re-start eit here ?
|
//wakeupAll(); //FIXME should we re-start eit here ?
|
||||||
}
|
}
|
||||||
@@ -2054,11 +2056,7 @@ static void print_meminfo(void)
|
|||||||
if (!sections_debug)
|
if (!sections_debug)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
#ifdef __UCLIBC__
|
MALLOC_STATS(NULL);
|
||||||
malloc_stats(NULL);
|
|
||||||
#else
|
|
||||||
malloc_stats();
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------
|
//---------------------------------------------------------------------
|
||||||
|
@@ -4707,7 +4707,11 @@ void CNeutrinoApp::Cleanup()
|
|||||||
printf("cleanup 6\n");fflush(stdout);
|
printf("cleanup 6\n");fflush(stdout);
|
||||||
delete CVFD::getInstance();
|
delete CVFD::getInstance();
|
||||||
#ifdef __UCLIBC__
|
#ifdef __UCLIBC__
|
||||||
|
#if (__UCLIBC_MAJOR__ >= 1) && (__UCLIBC_MINOR__ >= 0) && (__UCLIBC_SUBLEVEL__ >= 10)
|
||||||
|
malloc_stats();
|
||||||
|
#else
|
||||||
malloc_stats(NULL);
|
malloc_stats(NULL);
|
||||||
|
#endif
|
||||||
#else
|
#else
|
||||||
malloc_stats();
|
malloc_stats();
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user