POINTER (CMD_PTR, CMD) POINTER (RMD_PTR, RMD) POINTER (IMD_PTR, IMD) COMPLEX*16 CMD(0:1) REAL*8 RMD(0:1) INTEGER IMD(0:1)
At this point the arrays IMD, RMD and CMD exist in your application, but they start at address zero.
The next step is to map these arrays directly to FMS managed memory using the following calls:
CALL FMSIGT ('MEMPTR', CMD_PTR) CALL FMSIGT ('MEMPTR', RMD_PTR) CALL FMSIGT ('MEMPTR', IMD_PTR)
The arrays IMD, RMD and CMD now share the same addresses with the FMS managed memory. Note that all 3 arrays share the same address space.
Before you can use the memory allocated by FMS, you must allocate it from the FMS memory pool. The routines FMSIMG, FMSRMG, FMSCMG perform that task. When the memory is no longer required, you may return it to the pool by calling FMSIMR, FMSRMR, FMSCMR.