aboutsummaryrefslogtreecommitdiffstats
path: root/community/openvas-scanner/malloc-trim.patch
blob: 8c2a80ff5f6a878f30f4bc2599ead5bb8a359d43 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
diff --git a/src/pluginscheduler.c b/src/pluginscheduler.c
index 069b110..8e0f1f7 100644
--- a/src/pluginscheduler.c
+++ b/src/pluginscheduler.c
@@ -305,7 +305,9 @@ plugins_scheduler_init (const char *plugins_list, int autoload,
       plugins_scheduler_free (ret);
       return NULL;
     }
+#ifdef __GLIBC__
   malloc_trim (0);
+#endif
   return ret;
 }

@@ -407,7 +409,9 @@ scheduler_phase_cleanup (plugins_scheduler_t sched, int start, int end)
           element = element->next;
         }
     }
+#ifdef __GLIBC__
   malloc_trim (0);
+#endif
 }

 struct scheduler_plugin *