From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111c93,b0745a0b15631e1d,start X-Google-Attributes: gid111c93,public From: Owen Peter Vajk Subject: Maximum array size? Date: 1999/02/10 Message-ID: <36C208BE.1D15@leland.Stanford.EDU>#1/1 X-Deja-AN: 442983667 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 Newsgroups: comp.os.linux.alpha Is there a maximum size for an array in C on an alpha? I have a program that uses a character array that's about 27 MB, on an alpha with 128 MB of RAM. I compile it under gcc, and when I run it I get a segmentation fault immediately, even before it hits my first debug print statement. Any suggestions? The limit seems to be a bit below 2^23 characters. This bit of code produces a segmentation fault: ---------------------------- #include int main() { char array[8384432]; printf("Hello, world!\n"); } ---------------------------- while this one runs normally: ---------------------------- #include int main() { char array[8384433]; printf("Hello, world!\n"); } ---------------------------- Does this hold true for anyone else? And does anyone know how to get around this limit, since there is certainly more than enough physical memory to hold such an array. Thanks, Owen Vajk ovajk*@leland.stanford.edu