diff options
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 efd834624..beb3d5135 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) | |||
849 | GNUNET_SERVICE_OPTION_SOFT_SHUTDOWN, &run, NULL)) ? 0 : 1; | 849 | GNUNET_SERVICE_OPTION_SOFT_SHUTDOWN, &run, NULL)) ? 0 : 1; |
850 | } | 850 | } |
851 | 851 | ||
852 | #ifdef LINUX | ||
853 | #include <malloc.h> | ||
854 | |||
855 | /** | ||
856 | * MINIMIZE heap size (way below 128k) since this process doesn't need much. | ||
857 | */ | ||
858 | void __attribute__ ((constructor)) GNUNET_ARM_memory_init () | ||
859 | { | ||
860 | mallopt (M_TRIM_THRESHOLD, 4 * 1024); | ||
861 | mallopt (M_TOP_PAD, 1 * 1024); | ||
862 | malloc_trim (0); | ||
863 | } | ||
864 | #endif | ||
865 | |||
866 | |||
852 | /* end of gnunet-service-statistics.c */ | 867 | /* end of gnunet-service-statistics.c */ |