-2

I keep getting a stack Overflow! Probably my code could be written a lot better, I know.

But I just need to increase the stack size for just one routine (a recursion with a very big array :-( )

I was told to solve it like that:

In my Project ->

Properties -> Configuration Properties -> Linker -> System -> Stack Reserve Size :

But I can't get to that screen.

I can go to Project -> Properties and that's where it ends.

enter image description here

I used all of the above items, but I never saw an option to increase the stack size...

Can anyone please help me solving that problem?

Using Visual Studio 2017 Community with c#

Thank you

Stephen Kennedy
  • 20,585
  • 22
  • 95
  • 108
fic
  • 1
  • 1
  • 2
  • 3
    Have you tested that your code works with small array? If you still get stackoverflow then you probably have infinite recursion. Increasing stack size wont help in that case – M.kazem Akhgary Feb 16 '19 at 18:09
  • 1
    Show us your recursive code... – Idle_Mind Feb 16 '19 at 18:36
  • You tell you were told to solve it like that. Unless this is some kind of exersize, I would say it's a waste of time whichever way you look at it. Better to spend the time rewriting the code to fix the actual problem. – Bent Tranberg Feb 16 '19 at 18:49
  • Possible duplicate of [How to change stack size for a .NET program?](https://stackoverflow.com/questions/2556938/how-to-change-stack-size-for-a-net-program) – Alessandro Da Rugna Feb 17 '19 at 02:06
  • Thank you Alessandro. That did the trick. I used a thread. Works like a charm right now!!! – fic Feb 18 '19 at 10:34

1 Answers1

-1

In dot net core or normal dot net, we don't need to increase the stack because of the framework is responsible for this stuff. If we talk about c++ now is reusable to talk about stack size