tk_rel_mpf

Release Fixed-size Memory Block

[C Language Interface]

ER ercd = tk_rel_mpf ( ID mpfid, VP blf ) ;

[Parameters]

ID	mpfid	Fixed-size memory pool ID


VP	blf	Memory block start address

[Return Parameters]

ER	ercd	Error code

[Error Codes]

E_OK	Normal completion


E_ID	Invalid ID number (mpfid is invalid or cannot be used)


E_NOEXS	Object does not exist (the fixed-size memory pool specified in mpfid does not exist)


E_PAR	Parameter error (blf is invalid, or block returned to wrong memory pool)

[Description]

Returns the memory block specified in blf to the fixed-size memory pool specified in mpfid.

Executing tk_rel_mpf may enable memory block acquisition by another task waiting to allocate memory from the memory pool specified in mpfid, releasing the WAIT state of that task.

When a memory block is returned to a fixed-size memory pool, it must be the same fixed-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.

Comments

Click here to Post a Comment