I just filed a bug report that includes a minimal test case, in which all the calls to calloc() are made from within main(). There are no calls of any sort to Objective-C methods or any use of Cocoa Touch classes.
rdar://10417644 I don't REALLY need to exhaust my App's memory space. What I really need to do is find out how much memory I can safely allocate. I would have expected to do that by allocating as much memory as the user asks for, then backing out gracefully if any of the allocations failed. It would be enough if there were some way I could check ahead of time how much I can safely allocate, without actually trying to allocate it. Is there an API for that? My App seems to be getting killed without any UNIX signals being delivered to it. GDB is unaware that the process has terminated after it has been killed. As I said before the Simulator does the right thing. In the Simulator, I get these messages in GDB: No_Cocoa_Touch(1834) malloc: *** mmap(size=16777216) failed (error code=12) *** error: can't allocate region *** set a breakpoint in malloc_error_break to debug I can set a breakpoint in malloc_error_break when I run on a device, but that breakpoint is never hit. A bad workaround would be to just empirically determine how much memory is safe to allocate by trying various grid sizes. A binary search would determine that pretty quickly for each of my devices. But that is not the desired solution, because future hardware models will likely have more physical RAM. Also the amount that can be safely allocated would depend on how much is left over from other processes, and so could not be counted upon to be any particular fixed amount. -- Don Quixote de la Mancha Dulcinea Technologies Corporation Software of Elegance and Beauty http://www.dulcineatech.com quix...@dulcineatech.com _______________________________________________ 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