MEDIUM: pools: call malloc_trim() from pool_gc()

If available it definitely makes sense to call it since it's also
called when stopping to reclaim the maximum possible memory.
This commit is contained in:
Willy Tarreau 2020-11-03 15:53:34 +01:00
parent 1d3c7003d9
commit 88366c2926

View File

@ -303,6 +303,10 @@ void pool_gc(struct pool_head *pool_ctx)
if (!isolated)
thread_release();
#if defined(HA_HAVE_MALLOC_TRIM)
malloc_trim(0);
#endif
}
#else /* CONFIG_HAP_LOCKLESS_POOLS */