This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Gcc problem on HP Unix


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]