My C arrays are too large
Achim Gratz
Stromeko@nexgo.de
Fri Sep 13 18:44:00 GMT 2019
Blair, Charles E III writes:
> My apologies for failing to reply on-list. I don't know how :(
>
> My machine is 64 bit, and I hope I installed the correct version of cygwin.
>
> This program:
>
> #include<stdio.h>
> int main(){char *a[50][8192];
> return 0;}
>
> compiles with gcc (no special options) but gives "Segmentation fault".
You are creating an automatic variable that's larger than the default
stack. You need to enlarge the stack, either during link time or later
e.g. via
peflags -x0x800000 a.out
Regards,
Achim.
--
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+
SD adaptations for Waldorf Q V3.00R3 and Q+ V3.54R2:
http://Synth.Stromeko.net/Downloads.html#WaldorfSDada
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
More information about the Cygwin
mailing list