ucx/mempool.h

changeset 113
8693d7874773
parent 103
08018864fb91
child 120
8170f658f017
     1.1 --- a/ucx/mempool.h	Mon Jul 15 15:43:18 2013 +0200
     1.2 +++ b/ucx/mempool.h	Mon Jul 15 16:59:52 2013 +0200
     1.3 @@ -45,10 +45,6 @@
     1.4      size_t size;
     1.5  } UcxMempool;
     1.6  
     1.7 -#define UCX_ALLOCATOR_MEMPOOL(pool) {pool, \
     1.8 -    (ucx_allocator_malloc) ucx_mempool_malloc, \
     1.9 -    (ucx_allocator_calloc) ucx_mempool_calloc, \
    1.10 -    (ucx_allocator_realloc) ucx_mempool_realloc}
    1.11  
    1.12  #define ucx_mempool_new_default() ucx_mempool_new(16)
    1.13  UcxMempool *ucx_mempool_new(size_t n);
    1.14 @@ -57,12 +53,14 @@
    1.15  void *ucx_mempool_malloc(UcxMempool *pool, size_t n);
    1.16  void *ucx_mempool_calloc(UcxMempool *pool, size_t nelem, size_t elsize);
    1.17  void *ucx_mempool_realloc(UcxMempool *pool, void *ptr, size_t n);
    1.18 +void ucx_mempool_free(UcxMempool *pool, void *ptr);
    1.19  
    1.20 -void ucx_mempool_free(UcxMempool *pool);
    1.21 +void ucx_mempool_destroy(UcxMempool *pool);
    1.22  
    1.23  void ucx_mempool_set_destr(void *ptr, ucx_destructor func);
    1.24  void ucx_mempool_reg_destr(UcxMempool *pool, void *ptr, ucx_destructor destr);
    1.25  
    1.26 +UcxAllocator* ucx_mempool_allocator(UcxMempool *pool);
    1.27  
    1.28  #ifdef	__cplusplus
    1.29  }

mercurial