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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to