Intel® Fortran Compiler Classic and Intel® Fortran Compiler Developer Guide and Reference
A newer version of this document is available. Customers should click here to go to the newest version.
Visible to Intel only — GUID: GUID-5F0D31B7-4EDB-4700-8404-549F63DE2A97
Visible to Intel only — GUID: GUID-5F0D31B7-4EDB-4700-8404-549F63DE2A97
FREE
Intrinsic Subroutine (Specific): Frees a block of memory that is currently allocated. Intrinsic subroutines cannot be passed as actual arguments.
CALL FREE (addr)
addr |
(Input) Must be of type INTEGER(4) on IA-32 architecture; INTEGER(8) on Intel® 64 architecture. This value is the starting address of the memory block to be freed, previously allocated by MALLOC. |
If the freed address was not previously allocated by MALLOC, or if an address is freed more than once, results are unpredictable.
Example
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