src/cx/basic_mempool.h

changeset 572
f0f99dd06d9f
parent 571
f83583a0bbac
--- a/src/cx/basic_mempool.h	Wed Aug 03 17:27:55 2022 +0200
+++ b/src/cx/basic_mempool.h	Mon Aug 08 17:12:00 2022 +0200
@@ -50,9 +50,6 @@
     /** Inherit base structure members. */
     CxMempool base;
 
-    /** The underlying allocator. */
-    CxAllocator *allocator;
-
     /** List of pointers to pooled memory. */
     void **data;
 
@@ -67,28 +64,10 @@
  * Creates a basic array-based memory pool.
  *
  * @param capacity the initial capacity of the pool
- * @param allocator the underlying allocator
  * @return the created memory pool or \c NULL if allocation failed
  */
 __attribute__((__warn_unused_result__))
-CxMempool *cxBasicMempoolCreate(
-        size_t capacity,
-        CxAllocator *allocator
-);
-
-
-/**
- * Creates a basic array-based memory pool.
- *
- * The pool will use the default standard library allocator.
- *
- * @param capacity the initial capacity of the pool
- * @return the created memory pool or \c NULL if allocation failed
- */
-__attribute__((__warn_unused_result__))
-static inline CxMempool *cxBasicMempoolCreateSimple(size_t capacity) {
-    return cxBasicMempoolCreate(capacity, cxDefaultAllocator);
-}
+CxMempool *cxBasicMempoolCreate(size_t capacity);
 
 #ifdef __cplusplus
 } // extern "C"

mercurial