• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: stack overflow error
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: stack overflow error


  • Subject: Re: stack overflow error
  • From: Florijan Stamenkovic <email@hidden>
  • Date: Sat, 21 Oct 2006 13:32:02 +0200


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@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: stack overflow error
      • From: Florijan Stamenkovic <email@hidden>
References: 
 >stack overflow error (From: Ken Anderson <email@hidden>)

  • Prev by Date: Re: Obscure Primary Key Gotcha
  • Next by Date: Re: stack overflow error
  • Previous by thread: Re: stack overflow error
  • Next by thread: Re: stack overflow error
  • Index(es):
    • Date
    • Thread