Stack size setting in VS.net

  • Thread starter Thread starter Peter
  • Start date Start date
P

Peter

My program causes StackOverflow because it makes many recursive calls due to
the program's nature (not a bug!).
I would like to know if there is any settings in the compiler or VS.NET IDE
so that I can increase the stack size to prevent the overflow error.
Thanks a lot!

Peter

http://www.infopx.com
 
Peter said:
My program causes StackOverflow because it makes
many recursive calls due to the program's nature (not
a bug!).

What are you doing recursively? There might be a better way.

P.
 
My program causes StackOverflow because it makes many recursive calls due
to
the program's nature (not a bug!).
I would like to know if there is any settings in the compiler or VS.NET IDE
so that I can increase the stack size to prevent the overflow error.
Thanks a lot!


If your program needs so much stack that the default stack size is not
sufficient then you certainly doing things wrong. maybe there is no need for
recursion or you can minimize the number of arguments or locals in your
method.
 
If your program needs so much stack that the default stack size is not
sufficient then you certainly doing things wrong. maybe there is no need
for
recursion or you can minimize the number of arguments or locals in your
method
I would tend to agree. The stack size should be more than sufficient
--
-----
Sam Gentile
Microsoft MVP - C#/.NET
..NET Blog http://samgentile.com/blog/

Please do NOT contact me directly but respond to
the newsgroup instead.
---------
cody said:
My program causes StackOverflow because it makes many recursive calls due to
the program's nature (not a bug!).
I would like to know if there is any settings in the compiler or VS.NET IDE
so that I can increase the stack size to prevent the overflow error.
Thanks a lot!


If your program needs so much stack that the default stack size is not
sufficient then you certainly doing things wrong. maybe there is no need
for
recursion or you can minimize the number of arguments or locals in your
method.

--
cody

[Freeware, Games and Humor]
www.deutronium.de.vu || www.deutronium.tk
 
Thanks for all your helps. I tried to recursive about 1000 times and then
found that the stack was overflow. Well, there's another way to solve the
problem... I am just a bit lazy to think about it because the recursive one
is very simple.

Peter

http://www.infopx.com


Sam Gentile said:
If your program needs so much stack that the default stack size is not
sufficient then you certainly doing things wrong. maybe there is no need
for
recursion or you can minimize the number of arguments or locals in your
method
I would tend to agree. The stack size should be more than sufficient
--
-----
Sam Gentile
Microsoft MVP - C#/.NET
.NET Blog http://samgentile.com/blog/

Please do NOT contact me directly but respond to
the newsgroup instead.
---------
cody said:
My program causes StackOverflow because it makes many recursive calls
due
to
the program's nature (not a bug!).
I would like to know if there is any settings in the compiler or VS.NET IDE
so that I can increase the stack size to prevent the overflow error.
Thanks a lot!


If your program needs so much stack that the default stack size is not
sufficient then you certainly doing things wrong. maybe there is no need
for
recursion or you can minimize the number of arguments or locals in your
method.

--
cody

[Freeware, Games and Humor]
www.deutronium.de.vu || www.deutronium.tk
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top