problems with allocation?_(re)

Sat, 26 Jul 1997 12:50:13 +0200 (MET DST)


According to Giuseppe Petrella:
> 
> The following simple program gave segmentation fault compiled on 
> digital alpha running osf
> 
> PROGRAM prova(input,output);
> var
>    mm: array[1..500000]of real;
> BEGIN
> END.

Global variables of the program are allocated in the stack segment,
not in the data segment.  DJGPP limits the stack to 256kB, Linux
seems to have no limit here.  Obviously, OSF has a limit, too.

This is a known problem.  I would like to do something against it,
but I was told that this would break Extended Pascal's nonlocal `goto'
(whatever that is), so I don't dare to touch this part of the compiler
as long as I don't have test programs.

To work around, either move the array to a Unit (or Module), or
make it a `__static__ array [...] of Real'.
           ^^^^^^^^^^
Hope this helps,

    Peter

 Dipl.-Phys. Peter Gerwinski, Essen, Germany, free physicist and programmer
peter.gerwinski@uni-essen.de - http://home.pages.de/~peter.gerwinski/ [970201]
 maintainer GNU Pascal [970714] - http://home.pages.de/~gnu-pascal/ [970125]


Peter Gerwinski (peter@agnes.dida.physik.uni-essen.de)

HTML conversion by Lluís de Yzaguirre i Maura
Institut de Lingüística Aplicada - Universitat "Pompeu Fabra"
e-mail: de_yza@upf.es