VMS Help  —  FORTRAN  Intrinsic Procedures, MALLOC
  MALLOC (integer)

  Class:  Elemental function - Specific

  Allocates a block of memory.

  The argument must be of type integer.  This value is the size in
  bytes of memory to be allocated.  If the argument is INTEGER*8, a
  64-bit (P3) space is allocated.

  The result is of type INTEGER*8.  The result is the starting
  address of the allocated memory.  The memory allocated can be freed
  by using the FREE intrinsic function.

  This function cannot be passed as an actual argument.

  Examples:

  Consider the following:

  INTEGER(4) SIZE
  REAL(4) STORAGE(*)
  POINTER (ADDR, STORAGE)     ! ADDR will point to STORAGE
  SIZE = 1024                 ! Size in bytes
  ADDR = MALLOC(SIZE)         ! Allocate the memory
  CALL FREE(ADDR)             ! Free it
  END
Close Help