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:
4138f15
)
MINOR: pools: export trim_all_pools()
author
Willy Tarreau
<w@1wt.eu>
Wed, 22 Mar 2023 14:36:29 +0000
(15:36 +0100)
committer
Willy Tarreau
<w@1wt.eu>
Wed, 22 Mar 2023 16:30:28 +0000
(17:30 +0100)
This way it will be usable from outside instead of malloc_trim().
include/haproxy/pool.h
patch
|
blob
|
history
src/pool.c
patch
|
blob
|
history
diff --git
a/include/haproxy/pool.h
b/include/haproxy/pool.h
index
d88b23f
..
d034fea
100644
(file)
--- a/
include/haproxy/pool.h
+++ b/
include/haproxy/pool.h
@@
-103,6
+103,7
@@
extern uint pool_debugging;
int is_trim_enabled(void);
int malloc_trim(size_t pad);
+void trim_all_pools(void);
void *pool_get_from_os(struct pool_head *pool);
void pool_put_to_os(struct pool_head *pool, void *ptr);
diff --git
a/src/pool.c
b/src/pool.c
index
5a515bc
..
8bc4805
100644
(file)
--- a/
src/pool.c
+++ b/
src/pool.c
@@
-116,7
+116,7
@@
static int(*_malloc_trim)(size_t) = NULL;
* its job. We just have to be careful as callers might already be isolated
* themselves.
*/
-static void trim_all_pools(void)
+void trim_all_pools(void)
{
int isolated = thread_isolated();