[英]Memory problem on iPhone 3G/2G, sdk 3.0
I encountered a crash in my game, here's the crash log (it's a stress test): 我在游戏中遇到崩溃,这是崩溃日志(这是压力测试):
PID RPRVT RSHRD RSIZE Command 1 340K 224K 436K launchd 14 124K 160K 216K update 15 568K 164K 620K syslogd 16 792K 612K 1.16M lockdownd 17 2.22M 664K 3.04M mediaserverd 18 296K 160K 440K mDNSResponder 20 540K 568K 1.25M iapd 21 248K 236K 456K fairplayd 22 640K 168K 1012K configd 23 6.42M 6.73M 9.14M SpringBoard 26 660K 212K 1.01M CommCenter 27 308K 164K 620K BTServer 28 19.1M 692K 19.9M TQServer 29 232K 188K 284K notifyd 1830 368K 596K 672K ptpd 1833 140K 164K 280K afcd 1835 148K 164K 288K afcd 1837 140K 160K 260K notification_pro 1848 3.83M 4.89M 4.76M MobileMusicPlaye 1855 19.7M 7.65M 23.6M MyGame **** 1856 616K 5.25M 2.27M MobilePhone 1857 292K 240K 1.25M ReportCrash
The RSIZE of MyGame is only 23.6MB, but the "Memory status: 11" indicate that the program recieves a shutdown command from OS due to memory problem. MyGame的RSIZE只有23.6MB,但是“内存状态:11”表示该程序由于内存问题而从OS接收到关机命令。
So if the memory problem is not caused by my program, is there any way to ignore the shutdown command post from OS? 因此,如果内存问题不是由我的程序引起的,有什么方法可以忽略OS中的shutdown命令吗?
And from the iPhone develop guide, the OS will terminate a bg process which enconters a memory problem. 根据iPhone开发指南,操作系统将终止bg进程,这会引发内存问题。 But the SpringBoard is not terminated. 但是SpringBoard没有终止。 So I think there should be a method to turn the memory management off in program. 所以我认为应该有一种方法可以在程序中关闭内存管理。
You can't ignore the memory warning. 您不能忽略内存警告。 The best you can do is try to free up some memory and hope your app doesn't get killed. 您能做的最好的事情就是尝试释放一些内存,并希望您的应用不会被杀死。
See this discussion for some insight. 请参阅此讨论以获得一些见解。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.