Link to home
Start Free TrialLog in
Avatar of stev0931
stev0931

asked on

Make stack bigger in VB.NET 2005

How do I make my stack bigger in VB.NET 2005?
Avatar of Bob Learned
Bob Learned
Flag of United States of America image

What stack?

Bob
Avatar of stev0931
stev0931

ASKER

the stack space for function calls
Why do you think you need more stack space?

What error (if any) are you getting?

Are you possibly dealing with recursion?...
I am getting an out-of-stackspace error.  It is because I am running some evolutionary experiments and the individuals in my population are getting rather large.  Yes, I am using recursion (I know recursive solutions are slower than iterative ones, but that's fine).
SOLUTION
Avatar of Mike Tomlinson
Mike Tomlinson
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I have to put a limit on the size of an individual anyway, so I should be fine if I can triple the stack space.  There would be a bunch of functions to convert to iterative, so this would be easier.
Hi stev0931,
> Yes, I am using recursion
Looks like you should revise your recursive call.
It is easy to run out of stack if your exit condition out of the recursion does not get satisfied.


Dabas
My recursive function terminates just fine.  I just don't have quite enough stack space.  Is there a way to allocate more memory for stack space?
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Will I have to do this every time I compile?  Or is this a one-time change?  Once I make the change, I'm assuming the executable will have the increased stack space no matter where it is run?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Great!  Thanks!