On Feb 18, 2009, at 3:22 AM, Michael Vannorsdel wrote:
Really it would be best to malloc the space, use it, and free it. Once you get to huge stack usage you gamble that you won't run out when there can be other higher up calls also consuming some (frameworks, libs, 3rd party code, ect). Also if you only use the large amount once in a while then you have a bunch of unutilized memory sitting around.

Agreed: use malloc for large memory allocations.

One other limit that you apparently haven't run into yet: some architectures limit the maximum size of a single stack frame, even if there is lots of space on the stack. ppc has a maximum 64K stack frame size; arm may have a similar limit.


--
Greg Parker     gpar...@apple.com     Runtime Wrangler


_______________________________________________

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 arch...@mail-archive.com

Reply via email to