Hi,
On Fri, 31 Mar 2000, Malcolm Cohen wrote:
> Peter Shenkin wrote:
> >Suppose I have a program that looks like this:
> >
> >PROGRAM testfoo
> > CALL foo( 1000000 )
> >END
> >SUBROUTINE foo( n )
> > INTEGER :: n
> > DOUBLE :: x( n, n, n, n )
> ^^^^^^
>
> Too much programming in C...
Well said.
> > x = 1
> >END
> >
> >Most UNIXes will give you a SEGV when you start to execute foo.
>
> On 32-bit systems this has little to do with automatic allocation and
> a lot to do with integer overflow. ...
Also well said.
However, pick some lower value of n that doesn't cause overflow, but
still exceeds the physical resources available, and my point remains
valid.
I'm sorry I concocted my "pedagogical" example so badly.
-P.
--
** Whether the playing field is level depends on the coordinate system. ***
********* Peter S. Shenkin; Schrodinger, Inc.; (201)433-2014 x111 *********
*********** [log in to unmask]; http://www.schrodinger.com ***********
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|