CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Main CFD Forum (https://www.cfd-online.com/Forums/main/)
-   -   How to increase stack size (VC++6.0) (https://www.cfd-online.com/Forums/main/6842-how-increase-stack-size-vc-6-0-a.html)

Newbie November 19, 2003 23:15

How to increase stack size (VC++6.0)
 
Everyone,

I encountered a stack overflow problem when I run my program which has a big array. I wonder if you all can tell me how increase stack size under VC++6.0 compiler environment.

Thanks!

Newbie

Marcus Lobbia November 26, 2003 00:34

Re: How to increase stack size (VC++6.0)
 
I do not know of any stack size setting in VC++6.0, but are you sure that you have enough memory installed on the machine to run your program? I have run into memory allocation errors on some of my programs when I physically do not have enough memory (e.g., 512MB, 1GB, etc) to account for all the variables and arrays. Try decreasing your array size (or number of arrays), or maybe install more memory...?

Rongguang Jia December 1, 2003 09:15

Re: How to increase stack size (VC++6.0)
 
Hi, Newbie,

The stack overflow may be because you have a big array in a function. If you place the array globally, probably you will solve this problem. Or you may used dynamic allocation on the heap if you insist on using the local array. In addition, you need to avoid too deep recursion.

Regards, Rongguang


All times are GMT -4. The time now is 01:37.