• 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
Deep Recursion
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Deep Recursion


  • Subject: Deep Recursion
  • From: "Gerriet M. Denkmann" <email@hidden>
  • Date: Thu, 28 Aug 2008 09:01:27 +0700

Yesterday I did some nice recursive programming - the only problem was: I did not intend to do so.
As a consequence, there was no defined end to the recursion, which made it essentially infinite.


Well, memory - specifially stack space - is not infinite, so eventually I got an EXEC_BAD_ADDR or something like it.

The real problem: while happily recursing away, the virtual memory exceeded all bounds of propriety, the swap files grew beyond all reasonable limits and the whole computer became (almost) unusable.
I could not kill the runaway app from Xcodes Stop button - I had to wait until the aforementioned exception did take place.
At which point gdb was started and offered to load some 50 000 stack frames, politely giving me the option to decline.


Is there some way (environment variable?) to limit the stack size to something smaller, so that the exception (probably from stack corruption) would show off earlier?

10.4.11 Tiger.


Kind regards,

Gerriet.

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Deep Recursion
      • From: "Michael Ash" <email@hidden>
    • Re: Deep Recursion
      • From: Wade Tregaskis <email@hidden>
  • Prev by Date: Re: File Extensions Problem
  • Next by Date: Re: [Moderator] Re: iphone SDK questions
  • Previous by thread: Re: Core Animation : are text attributes animatable ?
  • Next by thread: Re: Deep Recursion
  • Index(es):
    • Date
    • Thread