How does Visual Fortran allocate memory for arrays? I'm trying to picture what's going on inside the computer to cause a stack overflow. We're having a debate here centered around the simple test program below. What's the difference between the calling argument being allocated in the calling routine and sent in and the local variables?
We seem to have fixed our problem by changing the local variables from using the dimension passed in to using a constant. What is the compiler doing different?
We'd like to let the calling routine take care of the dimension.
subroutine foo(x, n)
c *** y & z are local variables ***
dimension x(n), y(n), z(max)
I'm using Visual Fortran v6.6a on W2K with 1Gb of RAM. I tried /stack:4000000 with no luck.
The real program we're debugging is a java client with a Corba server calling a C++/Fortran DLL via JNI which is making debugging a real pain.