9.183. MALLOC

9.183 MALLOC — Allocate dynamic memory

Description:

MALLOC(SIZE) allocates SIZE bytes of dynamic memory and returns the address of the allocated memory. The MALLOC intrinsic is an extension intended to be used with Cray pointers, and is provided in GNU Fortran to allow the user to compile legacy code. For new code using Fortran 95 pointers, the memory allocation intrinsic is ALLOCATE.

Standard:

GNU extension

Class:

Function

Syntax:

PTR = MALLOC(SIZE)

Arguments:
SIZE The type shall be INTEGER.
Return value:

The return value is of type INTEGER(K), with <