<li************@gmail.comwrote in message
news:27**********************************@u10g2000 prn.googlegroups.com...
:I am using Visual C++ 6 IDE,with 512MB RAM. I have coded a recursive
: function that has a correct end condition for recursion. There is no
: infinite recursion.
:
: For some input data,the recursive function gets called so many times
: that it causes a 'First-chance exception in a.exe: 0xC00000FD: Stack
: Overflow.'
:
: How do i increase the size of the program stack?
As already stated, stack size probably can be configured as
a parameter to your linker.
But I would like to add that, in production code, I usually avoid
poorly bounded recursion (in practice, everything that may recurse
for more than log(input size) .
Even if there cannot be infinite recursion, it is not a good sign
that you are hitting the default stack size limit of your platform.
Maybe recursion depth can be reduced by altering or tuning the
algorithm. If not, derecursifying the algorithm is advisable...
Regards -Ivan
--
http://ivan.vecerina.com/contact/?subject=NG_POST <- email contact form
Brainbench MVP for C++ <
http://www.brainbench.com