From 3105dbfcda92dcfd2e1690bc33107f8a0a87dbee Mon Sep 17 00:00:00 2001 From: "[CST] Focus" Date: Fri, 11 Jan 2013 15:13:21 +0400 Subject: [PATCH] eitd/sectionsd.cpp: fix different uclibc/glibc malloc_stats Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/fac86b3bdb193da346af2c298bdbebe6adae6e94 Author: [CST] Focus Date: 2013-01-11 (Fri, 11 Jan 2013) --- src/eitd/sectionsd.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/eitd/sectionsd.cpp b/src/eitd/sectionsd.cpp index 7f40b6452..137cbf1e1 100644 --- a/src/eitd/sectionsd.cpp +++ b/src/eitd/sectionsd.cpp @@ -996,7 +996,11 @@ 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 return ; } @@ -1122,7 +1126,11 @@ static void FreeMemory() unlockEvents(); +#ifdef __UCLIBC__ malloc_stats(NULL); +#else + malloc_stats(); +#endif xprintf("[sectionsd] free memory done\n"); //wakeupAll(); //FIXME should we re-start eit here ? } @@ -1902,7 +1910,11 @@ static void print_meminfo(void) if (!sections_debug) return; +#ifdef __UCLIBC__ malloc_stats(NULL); +#else + malloc_stats(); +#endif } //---------------------------------------------------------------------