Operating System - HP-UX
1752647 Members
5932 Online
108788 Solutions
New Discussion юеВ

Re: Huge stack segment sizes with aCC 3.13

 
astracon
New Member

Huge stack segment sizes with aCC 3.13

Hi,
I am experiencing a problem with large process size. I have identified that the stack segment grows by hundreds of MB, for no apparent reason.

I have tried to reproduce this in an example prog without success.

Has anyone seen this kind of behaviour before?

Thanks,
S.






2 REPLIES 2
A. Clay Stephenson
Acclaimed Contributor

Re: Huge stack segment sizes with aCC 3.13

Hi,

No, I haven't seen that behavior but if I had to guess, I would suspect unchecked recursion.
Especially if you a function with a large chunk of local variables which would be allocated off the stack. My first cut at this would be to do a stack trace. Hopefully, you will see the same function or a pair of mutually recursive functions called over and over.

Good Hunting, Clay
If it ain't broke, I can fix that.
A. Clay Stephenson
Acclaimed Contributor

Re: Huge stack segment sizes with aCC 3.13

Hi,

I've thought of one more thing to look for:

Local for 1 VERY LARGE local variable like an
array with a few extra zero's in declaration or if you are using #defines one slightly 'improved' value, e.g what was
#define MY_SIZE 0x5000 becomes 0xff5000.

The fact that you can't re-create the problem plus the fact that I can't do it either unless I resort to one of the two methods (recursion or bad declaration) above indicates that it probably is not a systemic problem with the compiler/linker.

I'm surprised that you have such a maxssiz, I prefer to keep mine much smaller so that problems like this appear much sooner.


More food for thought, Clay
If it ain't broke, I can fix that.