ucx/mempool.h

changeset 40
a95ee94b9204
parent 17
11dffb40cd91
child 70
88092b88ec00
--- a/ucx/mempool.h	Sat Sep 07 14:08:43 2013 +0200
+++ b/ucx/mempool.h	Mon Mar 17 18:42:01 2014 +0100
@@ -57,14 +57,17 @@
  * UCX mempool structure.
  */
 typedef struct {
+    /** UcxAllocator based on this pool */
+    UcxAllocator *allocator;
+    
     /** List of pointers to pooled memory. */
-    void   **data;
+    void         **data;
     
     /** Count of pooled memory items. */
-    size_t ndata;
+    size_t       ndata;
     
     /** Memory pool size. */
-    size_t size;
+    size_t       size;
 } UcxMempool;
 
 /** Shorthand for a new default memory pool with a capacity of 16 elements. */
@@ -210,14 +213,6 @@
  */
 void ucx_mempool_reg_destr(UcxMempool *pool, void *ptr, ucx_destructor destr);
 
-/**
- * Creates an UcxAllocator based on an UcxMempool.
- * 
- * @param pool the mempool to create the UcxAllocator for
- * @return a new UcxAllocator based on the specified pool
- */
-UcxAllocator* ucx_mempool_allocator(UcxMempool *pool);
-
 #ifdef	__cplusplus
 }
 #endif

mercurial