]> mj.ucw.cz Git - libucw.git/blobdiff - ucw/mempool.h
Mempool: Implemented mp_shrink().
[libucw.git] / ucw / mempool.h
index 9427a8ac122e3e99f51bb101a8eba0ef9024c710..b44b955a452713c35afffcfe94cdad1c2c8fd028 100644 (file)
@@ -137,6 +137,11 @@ void mp_stats(struct mempool *pool, struct mempool_stats *stats);
  **/
 u64 mp_total_size(struct mempool *pool);
 
+/**
+ * Release unused chunks of memory reserved for further allocation
+ * requests, but stop if mp_total_size() would drop below @min_total_size.
+ **/
+void mp_shrink(struct mempool *pool, u64 min_total_size);
 
 /***
  * [[alloc]]