]> mj.ucw.cz Git - libucw.git/blobdiff - lib/mempool.c
Implemented {mp,ep}_total_size().
[libucw.git] / lib / mempool.c
index 658f53845a99b73605d1fc6a3475318e82793056..fee77f03496d4c6e48d9637f55b3ff255223f208 100644 (file)
@@ -168,6 +168,14 @@ mp_stats(struct mempool *pool, struct mempool_stats *stats)
   mp_stats_chain(pool->unused, stats, 2);
 }
 
+u64
+mp_total_size(struct mempool *pool)
+{
+  struct mempool_stats stats;
+  mp_stats(pool, &stats);
+  return stats.total_size;
+}
+
 void *
 mp_alloc_internal(struct mempool *pool, uns size)
 {