src/cx/mempool.h

changeset 1283
89935fea4b7c
parent 1281
45746a08c59e
equal deleted inserted replaced
1282:0c8077f67e54 1283:89935fea4b7c
174 int cxMempoolTransfer( 174 int cxMempoolTransfer(
175 CxMempool *source, 175 CxMempool *source,
176 CxMempool *dest 176 CxMempool *dest
177 ); 177 );
178 178
179 /**
180 * Transfers an object from one pool to another.
181 *
182 * You can only transfer objects that have been allocated by this pool.
183 * Objects that have been registered with cxMempoolRegister() cannot be transferred this way.
184 *
185 * @attention If the object maintains a reference to the pool's allocator,
186 * you must make sure to update that reference to the allocator of the destination pool.
187 *
188 * @param source the pool to move the memory from
189 * @param dest the pool where to transfer the memory to
190 * @param obj pointer to the object that shall be transferred
191 * @retval zero success
192 * @retval non-zero failure or object was not found in the source pool
193 */
194 cx_attr_nonnull
195 cx_attr_export
196 int cxMempoolTransferObject(
197 CxMempool *source,
198 CxMempool *dest,
199 const void *obj
200 );
201
179 #ifdef __cplusplus 202 #ifdef __cplusplus
180 } // extern "C" 203 } // extern "C"
181 #endif 204 #endif
182 205
183 #endif // UCX_MEMPOOL_H 206 #endif // UCX_MEMPOOL_H

mercurial