]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: pools: export trim_all_pools()
authorWilly Tarreau <w@1wt.eu>
Wed, 22 Mar 2023 14:36:29 +0000 (15:36 +0100)
committerWilly 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
src/pool.c

index d88b23faeeb8b37d098b5a4e91d43f26faad3423..d034feaff5872ab1851e8a192baa43581e9f4ed9 100644 (file)
@@ -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);
index 5a515bc5d4384457dc28ff2247d7ed3a694aca8f..8bc4805c465cf96728e44156c4c55f41317ec852 100644 (file)
@@ -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();