projects
/
haproxy-2.5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1d3c700
)
MEDIUM: pools: call malloc_trim() from pool_gc()
author
Willy Tarreau
<w@1wt.eu>
Tue, 3 Nov 2020 14:53:34 +0000
(15:53 +0100)
committer
Willy Tarreau
<w@1wt.eu>
Thu, 5 Nov 2020 18:27:08 +0000
(19:27 +0100)
If available it definitely makes sense to call it since it's also
called when stopping to reclaim the maximum possible memory.
src/pool.c
patch
|
blob
|
history
diff --git
a/src/pool.c
b/src/pool.c
index
321f8bc
..
73082e8
100644
(file)
--- 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 */