On Oct 19, 2006, at 19:37, Ken Anderson wrote:

It's during some pretty deep recursion, so I would really like to expand whatever stack is being used... the problem is, I'm not really clear how to do that. I've tried expanding the stack with - Xss, but that doesn't seem to help (and some documentation leads me to believe that's for the C stack, not the Java stack).

Has anyone run into this?  Any ideas?

If indeed you have a recursion which legally overflows, maybe you could re-implement your recursion to avoid that using multiple threads. The idea is that you attempt to find the stack length using:

workerThread.getStackTrace().length,

and then see if that length is approaching the maximum stack length, whatever value that might be. If so, you could continue the recursion in another thread. That should not be too difficult... You would need to test this however, because the above mentioned Thread method does not guarantee a true result on all VMs. If it works, overflowing should not be a problem. Just make sure your recursion actually does end at some point :)

Can  anyone see this working?

Cheers
Flor

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to