Data Type

Integer

Units

REAL*8 (8-byte) words

Default Value

None. This is a read-only parameter.

Description

This parameter returns the amount of memory currently allocated in the FMS memory pool. The units of MDUSED are REAL*8 words (8-bytes).

You may use this parameter to determine the amount of memory left in the pool. For example:

        CALL FMSIMG ('MAXMD' , MAXMD )
        CALL FMSIMG ('MDUSED', MDUSED)
        MDLEFT = MAXMD - MDUSED
will compute the amount of memory left in the pool, MDLEFT.

If you try to allocate MDLEFT words of memory and fail, the FMS memory pool may have become fragmented. You may correct this condition by altering the order that you allocate and free memory from the pool. The longest arrays should be allocated first, and so on. Try using the call

        CALL FMSCST ('SHOW', 'MEMORY')
to display the current contents of the FMS memory pool.