Everything

rel_mpl

irel_mpl

Outline
Release variable-sized memory block.
C format
 ER      rel_mpl (ID mplid, VP blk);
 ER      irel_mpl (ID mplid, VP blk);
Parameter(s)
I/O
Parameter
Description
I
 ID      mplid;
ID number of the variable-sized memory pool to which the memory block is released.
I
 VP      blk;
Start address of memory block to be released.

Explanation
This service call returns the variable-sized memory block specified by parameter blk to the variable-sized memory pool specified by parameter mplid.
After returning the variable-size memory blocks, these service calls check the tasks queued to the target variable-size memory pool wait queue from the top, and assigns the memory if the size of memory requested by the wait queue is available. This operation continues until no tasks queued to the wait queue remain or no memory space is available. As a result, the task that acquired the memory is unlinked from the queue and moved from the WAITING state (variable-size memory block acquisition wait state) to the READY state, or from the WAITING-SUSPENDED state to the SUSPENDED state.
Note 1 The RI850V4 does not perform memory clear processing when returning the acquired variable-size memory block. The contents of the returned variable-size memory block are therefore undefined.
Note 2 When returning variable-size memory blocks, be sure to issue either of these service calls for the acquired variable-size memory pools. If the service call is issued for another variable-size memory pool, no error results but the operation is not guaranteed after that.
Return value
Macro
Value
Description
E_OK
0
Normal completion.
E_ID
-18
Invalid ID number.
- mplid < 0x0
- mplid > Maximum ID number
E_CTX
-25
Context error.
- This service call was issued in the CPU locked state.
E_NOEXS
-42
Non-existent object.
- Specified variable-sized memory pool is not registered.