aboutsummaryrefslogtreecommitdiff
path: root/src/topology
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2012-10-07 19:02:58 +0000
committerChristian Grothoff <christian@grothoff.org>2012-10-07 19:02:58 +0000
commit76cc98f7b32077470b413b6efce1b219906bf758 (patch)
tree206fb833e5dc4506f6d446ec3f946484469c8406 /src/topology
parenta60b958f984d08525b636a2c7eae564ebec54ae6 (diff)
downloadgnunet-76cc98f7b32077470b413b6efce1b219906bf758.tar.gz
gnunet-76cc98f7b32077470b413b6efce1b219906bf758.zip
-add logic to measure heap size for all processes that use statistics, reduce statistics, topology, nse and resolver heap usage using the same trick we used for arm
Diffstat (limited to 'src/topology')
-rw-r--r--src/topology/gnunet-daemon-topology.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/topology/gnunet-daemon-topology.c b/src/topology/gnunet-daemon-topology.c
index 2dc3c148b..682ad417c 100644
--- a/src/topology/gnunet-daemon-topology.c
+++ b/src/topology/gnunet-daemon-topology.c
@@ -1367,4 +1367,19 @@ main (int argc, char *const *argv)
1367 return ret; 1367 return ret;
1368} 1368}
1369 1369
1370
1371#ifdef LINUX
1372#include <malloc.h>
1373
1374/**
1375 * MINIMIZE heap size (way below 128k) since this process doesn't need much.
1376 */
1377void __attribute__ ((constructor)) GNUNET_ARM_memory_init ()
1378{
1379 mallopt (M_TRIM_THRESHOLD, 4 * 1024);
1380 mallopt (M_TOP_PAD, 1 * 1024);
1381 malloc_trim (0);
1382}
1383#endif
1384
1370/* end of gnunet-daemon-topology.c */ 1385/* end of gnunet-daemon-topology.c */