pget_mpf

ipget_mpf

Outline

Acquire fixed-sized memory block (polling).

C format

 ER      pget_mpf (ID mpfid, VP *p_blk);
 ER      ipget_mpf (ID mpfid, VP *p_blk);
Parameter(s)

I/O

Parameter

Description

I

 ID      mpfid;
ID number of the fixed-sized memory pool from which a memory block is acquired.

O

 VP      *p_blk;
Start address of the acquired memory block.



Explanation

This service call acquires the fixed-sized memory block from the fixed-sized memory pool specified by parameter mpfid and stores the start address in the area specified by parameter p_blk.

If a fixed-sized memory block could not be acquired from the target fixed-sized memory pool (no available fixed-sized memory blocks exist) when this service call is issued, fixed-sized memory block acquisition processing is not performed but "E_TMOUT" is returned.

Note 1 The RI850V4 does not perform memory clear processing when acquiring a fixed-sized memory block. The contents of the acquired fixed-sized memory block are therefore undefined.

Note 2 If no fixed-size memory blocks could be acquired from the target fixed-size memory pool (no available fixed-size memory blocks exist) when this service call is issued, the contents in the area specified by parameter p_blk become undefined.

Return value

Macro

Value

Description

E_OK

0

Normal completion.

E_ID

-18

Invalid ID number.

- mpfid < 0x0

- mpfid > 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 fixed-sized memory pool is not registered.

E_TMOUT

-50

Polling failure.

- There is no free memory block in the target fixed-sized memory pool.