• 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 14:59:37 +0200

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.

Uhm, I just realized that this works only if every thread has it's own stack with a standard maximum size, and not if all the threads share only one stack. I don't know enough of how things work to say that, I assumed that every thread has a separate stack. Sorry if I was mistaken, it seemed like a possible solution at the time.



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: Ken Anderson <email@hidden>
References: 
 >stack overflow error (From: Ken Anderson <email@hidden>)
 >Re: stack overflow error (From: Florijan Stamenkovic <email@hidden>)

  • Prev by Date: Re: stack overflow error
  • Next by Date: Re: [Wonder-disc] Helper Functions
  • Previous by thread: Re: stack overflow error
  • Next by thread: Re: stack overflow error
  • Index(es):
    • Date
    • Thread