If available it definitely makes sense to call it since it's also
called when stopping to reclaim the maximum possible memory.
(cherry picked from commit
88366c2926deac5ee257b6c541633b6a8b5111b3)
[wt: backported as it helps not only on reload but also on SIGQUIT to
try to return all unused memory]
Signed-off-by: Willy Tarreau <w@1wt.eu>
if (!isolated)
thread_release();
+
+#if defined(HA_HAVE_MALLOC_TRIM)
+ malloc_trim(0);
+#endif
}
#else /* CONFIG_HAP_LOCKLESS_POOLS */