Increase .NET stack space?

  • Thread starter Thread starter Tom
  • Start date Start date
T

Tom

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
 
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
 
Tom said:
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

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.
 
Back
Top