Sun Studio 12: Fortran Library Reference

1.4.35.3 free: Deallocate Memory Allocated by Malloc

The subroutine is called by:

call free ( ptr )

ptr

Cray POINTER

Input 

free deallocates a region of memory previously allocated by malloc and realloc(). The region of memory is returned to the memory manager; it is no longer available to the user’s program.

Example: free():


       real x
       pointer ( ptr, x )
       ptr = malloc ( 10000 )
       call free ( ptr )
       end