Go to the source code of this file.
|void ||QMPool_put (QMPool *const me, void *b)|
| ||Returns a memory block back to a memory pool. |
Definition in file qmp_put.c.
Returns a memory block back to a memory pool.
The first parameter me is a pointer to the QMPool to which the block is returned. The second parameter is the pointer to the returned memory block.
This function can be called from any task level or ISR level.
- The block must be allocated from the same memory pool to which it is returned. The QMPool_put() function raises an assertion if the returned pointer to the block points outside of the original memory buffer managed by the memory pool. Also, the QMPool_put() function uses internally a QF critical section, so you should be careful not to call it from within a critical section when nesting of critical section is not supported.
- See also:
Definition at line 55 of file qmp_put.c.
References QMPool::end, QMPool::free_head, QMPool::nFree, QMPool::nTot, Q_REQUIRE, QS_BEGIN_NOCRIT_, QS_END_NOCRIT_, QS_mpObj_, QS_OBJ_, QS_QF_MPOOL_PUT, QS_TIME_, and QMPool::start.