tk_rel_mpl
Release Variable-size Memory Block
ER ercd = tk_rel_mpl ( ID mplid, VP blk ) ;
ID mplid Variable-size memory pool ID
VP blk Memory block start address
ER ercd Error code
E_OK Normal completion
E_ID Invalid ID number (mplid is invalid or cannot be used)
E_NOEXS Object does not exist (the variable-size memory pool specified in mplid does not exist)
E_PAR Parameter error (blk is invalid, or block returned to wrong memory pool)
Returns the memory block specified in blk to the variable-size memory pool specified in mplid.
Executing tk_rel_mpl may enable memory block acquisition by another task waiting to allocate memory from the memory pool specified in mplid, releasing the WAIT state of that task.
When a memory block is returned to a variable-size memory pool, it must be the same variable-size memory pool from which the block was allocated. If an attempt to return a memory block to a different memory pool is detected, error code E_PAR is returned. Whether or not this error detection is carried out is implementation-dependent.
When memory is returned to a variable-size memory pool in which multiple tasks are queued, multiple tasks may be released at the same time depending on the amount of memory returned and the requested memory sizes. The task precedence among tasks of the same priority after their WAIT state is released in such a case is the order in which they were queued.

Comments
Click here to Post a Comment