Article View: gnu.gcc.bug
Article #6320Re: Memory allocation bug (?)
From: Torbjorn Granlund
Date: Tue, 19 Dec 1995 00:00
Date: Tue, 19 Dec 1995 00:00
24 lines
1203 bytes
1203 bytes
The allowed stack size is dependent on the operating system. Your example
shows that the stack is allowed to expand more by default on AIX than on
Solaris and Linux.
Try using limit/ulimit (the name depends on the shell) to set the stack
limit higher, or use malloc to allocate large blocks.
Torbjorn
I found that next simple program compiles with gcc
(tested with version 2.6.0 in Solaris and 2.7.0 in linux 1.3.30)
-----
#include <stdio.h>
main()
{
int i;
char a[26000001];
for (i=0; i<26000000; i++) a[i] = 0;
}
-----
Problem is that it gives me Segmentation Fault.
When I compile it with AIX XL C compiler under AIX it works correctly.
Technical Details
Message-ID:
<199512191621.RAA17561@insanus.matematik.su.se>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<Pine.LNX.3.91.951219175937.3124A-100000@cray.tuug.utu.fi>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 113d02,fa1a7c33c9297a85,start X-Google-Attributes: gid113d02,public From: tege@matematik.su.se (Torbjorn Granlund) Subject: Re: Memory allocation bug (?) Date: 1995/12/19 Message-ID: <199512191621.RAA17561@insanus.matematik.su.se> X-Deja-AN: 122307800 distribution: gnu sender: daemon@cis.ohio-state.edu references: <Pine.LNX.3.91.951219175937.3124A-100000@cray.tuug.utu.fi> organization: GNUs Not Usenet newsgroups: gnu.gcc.bug