diff options
author | David Barksdale <amatus.amongus@gmail.com> | 2013-07-22 08:26:16 -0500 |
---|---|---|
committer | David Barksdale <amatus.amongus@gmail.com> | 2013-07-22 08:26:16 -0500 |
commit | 7450bd0b6c6c05ee6425e2c63e9b79beb94bfbfa (patch) | |
tree | dfde89b41437def7ce23af24db53a11a9b5f1075 /src/statistics/gnunet-service-statistics.c | |
parent | 740b30688bd745a527f96f9116c19acb3480971a (diff) |
Imported Upstream version 0.9.5aupstream
Diffstat (limited to 'src/statistics/gnunet-service-statistics.c')
-rw-r--r-- | src/statistics/gnunet-service-statistics.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/statistics/gnunet-service-statistics.c b/src/statistics/gnunet-service-statistics.c index efd8346..beb3d51 100644 --- a/src/statistics/gnunet-service-statistics.c +++ b/src/statistics/gnunet-service-statistics.c @@ -849,4 +849,19 @@ main (int argc, char *const *argv) GNUNET_SERVICE_OPTION_SOFT_SHUTDOWN, &run, NULL)) ? 0 : 1; } +#ifdef LINUX +#include <malloc.h> + +/** + * MINIMIZE heap size (way below 128k) since this process doesn't need much. + */ +void __attribute__ ((constructor)) GNUNET_ARM_memory_init () +{ + mallopt (M_TRIM_THRESHOLD, 4 * 1024); + mallopt (M_TOP_PAD, 1 * 1024); + malloc_trim (0); +} +#endif + + /* end of gnunet-service-statistics.c */ |