mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-07 07:37:02 +02:00
MINOR: pattern: use trim_all_pools() instead of a conditional malloc_trim()
First this will ensure that we serialize the threads and avoid severe contention. Second it removes ugly ifdefs and conditions.
This commit is contained in:
parent
7aee683541
commit
9b060f148e
@ -2083,11 +2083,8 @@ int pat_ref_purge_range(struct pat_ref *ref, uint from, uint to, int budget)
|
|||||||
list_for_each_entry(expr, &ref->pat, list)
|
list_for_each_entry(expr, &ref->pat, list)
|
||||||
HA_RWLOCK_WRUNLOCK(PATEXP_LOCK, &expr->lock);
|
HA_RWLOCK_WRUNLOCK(PATEXP_LOCK, &expr->lock);
|
||||||
|
|
||||||
#if defined(HA_HAVE_MALLOC_TRIM)
|
if (done)
|
||||||
if (done && is_trim_enabled()) {
|
trim_all_pools();
|
||||||
malloc_trim(0);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return done;
|
return done;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user