Re: iOS 6, VoIP, and -viewDidLoad
Re: iOS 6, VoIP, and -viewDidLoad
- Subject: Re: iOS 6, VoIP, and -viewDidLoad
- From: Michael Crawford <email@hidden>
- Date: Thu, 20 Jun 2013 09:57:10 -0700
On 6/20/13, Michael Crawford <email@hidden> wrote:
> I am trying to trigger this behavior by allocating huge amounts of memory
> on a timer and then leaking it on purpose but so far, instead of getting a
> memory warning and then subsequently having the app evicted due to memory
> pressure, malloc simply returns nullptr. I've tried this with allocation
> units of 100 megabytes and then with 1 megabyte.
But seriously folks...
I expect you could trigger the watchdog by blocking the GUI thread.
Just put a button somewhere in your app that, when clicked, enters an
infinite loop. On OS X, that would cause the Spinning Pizza Of Death
to occur. I expect that on iOS, the system would wait a little while
to determine whether you've just stopped consuming events, and then
kill your app.
To stimulate a crash, try this:
+ (void) crash
{
realCrash( 0 );
}
+ (void) realCrash (int) denominator
{
return 2 / denominator;
}
That's to avoid compiler warnings.
The abort() call usually works by executing an illegal instruction as well.
I'll send you my bill in the mail.
Mike
email@hidden
--
Michael David Crawford
mdcrawford at gmail dot com
Custom Software Development for the iPhone and Mac OS X
http://www.dulcineatech.com/custom-software-development/
_______________________________________________
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