On Wed, 29 Mar 2000, Phillip Helbig wrote:
> Keep in mind that the same program might cause different or no errors on
> another system, even with the same amount of memory and the same
> settings---what part of memory is allocated on the stack and what on the
> heap etc is platform-dependent.
Sometimes compilers have a switch to force automatic arrays (i.e. local to
a subroutine) to be always allocated on the heap, instead of the stack.
But this might have the effect of allocating them as if they are
SAVEd, so if you have many of them the effects will be actually worse.
Still, it might work on systems where the limit on stack allocations is
much smaller than the limit on total memory (RAM+swap).
BTW, I thought that the SGI compiler would work like Compaq's one on the
Alpha, allocating automatic arrays below certain size on the stack, and
above that size on the heap (if I understood this behavior correctly).
Cheers,
Jose
--
Jose L Marin [log in to unmask]
Dept of Mathematics [log in to unmask]
Heriot-Watt University
Edinburgh EH14 4AS, U.K.
Phone: +44 131 451 3893
Fax: +44 131 451 3249
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|