src/cx/mempool.h

changeset 1281
45746a08c59e
parent 1180
4c3a69b9723a
child 1283
89935fea4b7c
equal deleted inserted replaced
1280:60123b3db06e 1281:45746a08c59e
154 CxMempool *pool, 154 CxMempool *pool,
155 void *memory, 155 void *memory,
156 cx_destructor_func destr 156 cx_destructor_func destr
157 ); 157 );
158 158
159 /**
160 * Transfers all the memory managed by one pool to another.
161 *
162 * The allocator of the source pool will also be transferred and registered with the destination pool
163 * and stays valid, as long as the destination pool is not destroyed.
164 *
165 * The source pool will get a completely new allocator and can be reused or destroyed afterward.
166 *
167 * @param source the pool to move the memory from
168 * @param dest the pool where to transfer the memory to
169 * @retval zero success
170 * @retval non-zero failure
171 */
172 cx_attr_nonnull
173 cx_attr_export
174 int cxMempoolTransfer(
175 CxMempool *source,
176 CxMempool *dest
177 );
178
159 #ifdef __cplusplus 179 #ifdef __cplusplus
160 } // extern "C" 180 } // extern "C"
161 #endif 181 #endif
162 182
163 #endif // UCX_MEMPOOL_H 183 #endif // UCX_MEMPOOL_H

mercurial