Is there any way to increase the .NET stack space? A coworker is
writing a VB.NET application that is using recursion, and it is running
out of stack space. I am going to suggest that he rewrite his recursion
routine to NOT use recursion, but thought I would check first to see if
there were any way to increase the .NET stack size... I did do a Google
search but didn't find anything there.
Thanks.
Tom
Tom Dacon - 01 Jul 2005 01:09 GMT
First thing to do is review the recursive logic to see why it's taking so
much stack space. Maybe the recursive algorithm is not properly terminating?
Maybe some of the objects being created on the stack might better reside on
the heap (use classes instead of structs)? If the stack usage is justified,
perhaps the nature of the problem doesn't actually lend itself to a
recursive solution.
HTH,
Tom Dacon
Dacon Software Consulting
> Is there any way to increase the .NET stack space? A coworker is
> writing a VB.NET application that is using recursion, and it is running
[quoted text clipped - 6 lines]
>
> Tom
Willy Denoyette [MVP] - 01 Jul 2005 10:40 GMT
> Is there any way to increase the .NET stack space? A coworker is
> writing a VB.NET application that is using recursion, and it is running
[quoted text clipped - 6 lines]
>
> Tom
The only way to change the stack size in v1.x is to run EDITBIN.exe on the
.exe file.
Note that you'll change the stack size of all threads in the process.
Willy.