Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watnot!watmath!clyde!cbatt!ucbvax!decvax!linus!bs From: bs@linus.UUCP Newsgroups: comp.lang.c,comp.unix.questions Subject: Re: Question on large arrays in C Message-ID: <520@linus.UUCP> Date: Fri, 13-Feb-87 08:33:21 EST Article-I.D.: linus.520 Posted: Fri Feb 13 08:33:21 1987 Date-Received: Sat, 14-Feb-87 14:20:41 EST References: <1051@uwmacc.UUCP> Organization: The MITRE Corp., Bedford, MA Lines: 24 Keywords: C unix Xref: utgpu comp.lang.c:1038 comp.unix.questions:1030 Summary: I suspect you ran out of stack space In article <1051@uwmacc.UUCP>, jwp@uwmacc.UUCP (Jeffrey W Percival) writes: > #include > #define N 20480 > main() > { > double x[N]; > double y_1[N]; > double y_4[N]; etc. > When I run it, I get "Segmentation violation". Try typing 'limit' to UNIX. It will tell you what your current program size and stack size limits are. I suspect, that since your variables are local, and hence placed on the stack, that you have overflowed the stack size limit. One can set stacksize limits via: % limit stacksize amount where amount is how much space you want Bob Silverman