简体   繁体   中英

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.

So if the memory problem is not caused by my program, is there any way to ignore the shutdown command post from OS?

And from the iPhone develop guide, the OS will terminate a bg process which enconters a memory problem. But the SpringBoard is not terminated. 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM