Reuse the size of assumed-shape array vs. allocate

On the classic Cray systems, the stack(s) actually resided in heap blocks. Generally multiple stack frames could fit in a single heap block. However if upon invocation a procedure required more stack space than was available in the block, an additional heap block was allocated and linked back to the previous one. There was an API to tune things as well.

Some modern compilers have an option to heap allocate automatic arrays when they are greater than some specified size. (E.g., Intels -heap-arrays option.)