[ODE] Stack overflow

Nate W coding at natew.com
Fri Jan 31 14:14:02 2003


I just recompiled Juice with the stack reserve size set to 800MB, it runs
fine and according to TaskMan I'm using no more memory than usual.  I wish
I'd thought to try this sooner...  I still had this 'scarcity' additude
that you should keep memory requests as small as possible, but that
doesn't really apply when the operating system isn't brain-dead.  A
holdover from the DOS days, I guess.

Anyhow, more testing may be in order, but it seems to me that the Windows
stack overflow problem is really a non-issue.  Maybe there should be
something in the FAQ suggesting that Windows users set the stack size
linker option to the greater of these two values:

1) double your physical memory
2) a couple orders of magnitude bigger than you expect to need

...and let the operating system take care of the rest.  If the situation
arises where the simulation really does need double your physical memory,
the problem is more substantial than just replacing alloca().  :-)

-- 

Nate Waddoups
Redmond WA USA
http://www.natew.com