Mail Archives: djgpp/1999/11/10/10:07:45
On Mon, 8 Nov 1999, Sebastian Buntin wrote:
> typedef struct {
>
> float x,y,z;
> float w;
> int faces;
> int faceto[10];
> } vector3d;
>
> int main () {
> // some declarations....
> int k;
> vector3d obj[8000];
> printf("HELLO\n");
>
> for (k=0;k<8000;k++)
> do_some_stuff(&obj[k], var1, var2);
>
>
> // rest of code (switch to graphic mode, putpixel, etc...)
> }
>
> using this code works very well (and of course FAST)...but if I increase the
> array-size, or add MANY more variables, the program still compiles very
> well...but breaks with
>
> SIGSEGV
> Stack Fault at eip=00001b21
You are overflowing the 512KB run-time stack ("8000*sizeof(vector3d)" is
_way_ more than 512KB). See section 15.9 of the DJGPP FAQ list for more
about this.
- Raw text -