projects
/
haproxy-3.0.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7aee683
)
MINOR: pattern: use trim_all_pools() instead of a conditional malloc_trim()
author
Willy Tarreau
<w@1wt.eu>
Wed, 22 Mar 2023 14:38:13 +0000
(15:38 +0100)
committer
Willy Tarreau
<w@1wt.eu>
Wed, 22 Mar 2023 16:30:28 +0000
(17:30 +0100)
First this will ensure that we serialize the threads and avoid severe
contention. Second it removes ugly ifdefs and conditions.
src/pattern.c
patch
|
blob
|
history
diff --git
a/src/pattern.c
b/src/pattern.c
index
71f25a4
..
6c263be
100644
(file)
--- a/
src/pattern.c
+++ b/
src/pattern.c
@@
-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)
HA_RWLOCK_WRUNLOCK(PATEXP_LOCK, &expr->lock);
-#if defined(HA_HAVE_MALLOC_TRIM)
- if (done && is_trim_enabled()) {
- malloc_trim(0);
- }
-#endif
+ if (done)
+ trim_all_pools();
return done;
}