@@ -316,31 +316,35 @@ void *poolMalloc(long size /* bytes */);
316
316
* \ref MEM_POOL_GROW. If this fails, an error is created, else \p ptr is
317
317
* added.
318
318
* \param[in] ptr pointer to a \ref block.
319
+ * \pre
320
+ * all memory pointed to by \p ptr is considered free.
321
+ * \post
322
+ * \ref poolTotalFree is updated
319
323
* \bug calls outOfMemory, that can stack up endlessly
320
324
*/
321
325
void poolFree (void * ptr );
322
326
/*!
323
327
* \fn addToUsedPool(void *ptr)
324
328
* \brief announces a block with free capacity for further allocation
325
329
*
330
+ * This function temporarily freezes the usage of a block for an old client, and
331
+ * allows temporary reallocation of the free capacity to a new client.
332
+ * \n
326
333
* The program maintains pools of memory blocks with free capacity. In case of
327
334
* demand such a \ref block can temporarily allocate this capacity for new
328
335
* usage. Of course two (or more) clients share different parts of the same
329
336
* \ref block then, so a newer client must complete its usage before the old
330
337
* one resumes operation and may want to extend its usage of the \ref block.
331
338
* \n
332
- * This function temporarily freezes the usage of a block for an old client, and
333
- * allows temporary reallocation of the free capacity to a new client.
334
- * \n
335
339
* Before \p ptr is added to \ref memUsedPool, the pool size is checked and
336
340
* increased by \ref MEM_POOL_GROW if full. This may lead to out-of-memory
337
341
* \ref bug "bugs". But if \p prt is added to the end of the \ref memUsedPool,
338
342
* \ref poolTotalFree is updated.
339
343
* \param[in] ptr pointer to a \ref block.
340
344
* \pre
341
- * the block is \ref fragmentation "fragmented" (contains unused pointers )
342
- * If this condition is violated \ref bug is called and the function returns
343
- * without further action.
345
+ * the block is \ref fragmentation "fragmented" (contains unused memory )
346
+ * If it is full \ref bug is called and the function returns without further
347
+ * action.
344
348
* \post
345
349
* - \ref poolTotalFree is the current free space in bytes in both pools.
346
350
* - A full \ref block is not added to \ref memUsedPool by this function.
0 commit comments