Skip to content

Commit 49af905

Browse files
committed
doc poolFree
1 parent ac1dc02 commit 49af905

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/mmdata.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,16 @@ extern flag g_globalDiscouragement; /* SET DISCOURAGEMENT */
308308
/* Allocation and deallocation in memory pool */
309309
void *poolFixedMalloc(long size /* bytes */);
310310
void *poolMalloc(long size /* bytes */);
311+
/*!
312+
* \fn poolFree(void *ptr)
313+
*
314+
* Removes \p ptr from the \ref memUsedPool, if it is listed there. Then tries
315+
* adding it to the \ref memFreePool. If this pool is full, it is increased by
316+
* \ref MEM_POOL_GROW. If this fails, an error is created, else \p ptr is
317+
* added.
318+
* \param[in] ptr pointer to a \ref block.
319+
* \bug calls outOfMemory, that can stack up endlessly
320+
*/
311321
void poolFree(void *ptr);
312322
/*!
313323
* \fn addToUsedPool(void *ptr)
@@ -334,6 +344,7 @@ void poolFree(void *ptr);
334344
* \post
335345
* - \ref poolTotalFree is the current free space in bytes in both pools.
336346
* - A full \ref block is not added to \ref memUsedPool by this function.
347+
* \bug calls outOfMemory, that can stack up endlessly
337348
*/
338349
void addToUsedPool(void *ptr);
339350
/* Purges reset memory pool usage */

0 commit comments

Comments
 (0)