This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Gcc problem on HP Unix
- To: Lee Stephen <lihaoming2000 at yahoo dot com dot cn>
- Subject: Re: Gcc problem on HP Unix
- From: Phil Edwards <pedwards at disaster dot jaj dot com>
- Date: Fri, 19 Oct 2001 09:29:07 -0400
- Cc: gcc at gcc dot gnu dot org
- References: <20011019080840.87295.qmail@web13506.mail.yahoo.com>
On Fri, Oct 19, 2001 at 04:08:40PM +0800, Lee Stephen wrote:
> mapnode a[2000];
[...]
> I ran this program on Solaris and Linux,everything is
> OK.I am sure the error is related with the array
> because it's too large.But I can't believe the system
> could not provide less than 10KB memory for this array.
Almost certainly it can, and almost certainly this has nothing to do with
the compiler. Try instead
mapnode *a = new mapnode[2000];
and if it works, then the problem is this: your sysadmin has imposed
a resource limit on the amount of stack space which can be allocated
per process. Try running the "limit" or "ulimit" command to see what
the limits are. (10KB sounds terribly small though... there's probably
something else which I haven't thought of.)
Luck++;
Phil
--
If ye love wealth greater than liberty, the tranquility of servitude greater
than the animating contest for freedom, go home and leave us in peace. We seek
not your counsel, nor your arms. Crouch down and lick the hand that feeds you;
and may posterity forget that ye were our countrymen. - Samuel Adams