heap-arrays

Puts automatic arrays and arrays created for temporary computations on the heap instead of the stack.

IDE Equivalent

Windows: Optimization > Heap Arrays

Linux: None

Mac OS X: Optimization > Heap Arrays

Architectures

IA-32, Intel® 64 architectures

Syntax

Linux and Mac OS X:

-heap-arrays [size]

-no-heap-arrays

Windows:

/heap-arrays[:size]

/heap-arrays-

Arguments

size

Is an integer value representing the size of the arrays in kilobytes. Any arrays known at compile-time to be larger than size are allocated on the heap instead of the stack.

Default

-no-heap-arrays or /heap-arrays-

The compiler puts automatic arrays and arrays created for temporary computations in temporary storage in the stack storage area.

Description

This option puts automatic arrays and arrays created for temporary computations on the heap instead of the stack.

If heap-arrays is specified and size is omitted, all automatic and temporary arrays are put on the heap. If 10 is specified for size, all automatic and temporary arrays larger than 10 KB are put on the heap.

Alternate Options

None

Example

In Fortran, an automatic array gets it size from a run-time expression. For example:

RECURSIVE SUBROUTINE F( N )
INTEGER :: N
REAL :: X ( N )     ! an automatic array
REAL :: Y ( 1000 )  ! an explicit-shape local array on the stack 

Array X in the example above is affected by the heap-array option. Array Y is not.


Submit feedback on this help topic

Copyright © 1996-2010, Intel Corporation. All rights reserved.