I have been using Compaq Visual Fortran to produce relatively straightforward Console applications (for multivariate applications in statistics). However, the methods I am programming usually require quite a lot of memory for doing matrix calculations. I have recently begun using Dynamic memory allocation, which helps me to manage memory. A "stack overflow" error, nevertheless, may still occur when attempting to run my program(s) with large data sets. I desperately need answers to the following:
(a) How do I work out the circumstances that will produce the stack overflow error?
(b) As I distribute my programs to others, I also need to know whether the circumstances in (a) are machine-specific (governed by RAM?) or not?
(c) Most IMPORTANTLY, I wish to know (or learn) how to produce programs that will not "blow up" like this with memory problems when sizes of matrices increase. Will this involve using virtual memory? How is this done?
I tried reading in the help files about something called "VirtualAlloc", but this apparently requires things like addressing particular places and sizes of memory and that basically read like greek to me. I would like to write programs that basically expand into the space they need for any particular use and on any particular machine.
Dr Marti Anderson