diff --git a/src/pool.c b/src/pool.c index 321f8bc67..73082e8cc 100644 --- a/src/pool.c +++ b/src/pool.c @@ -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 */