Possible Duplicate:
iPhone OS Memory Warnings. What Do The Different Levels Mean?
what is a memory warning, how do we respond to it
Possible Duplicate:
iPhone OS Memory Warnings. What Do The Different Levels Mean?
what is a memory warning, how do we respond to it
Check this SO question
iPhone OS Memory Warnings. What Do The Different Levels Mean? Check Kenny's answer
Memory level warnings are logged by SpringBoard. As an app developer you don't need to care about it. Just responding to -{application}didReceiveMemoryWarning
is enough.
There are 4 levels of warnings (0 to 3). These are set from the kernel memory watcher, and can be obtained by the not-so-public function OSMemoryNotificationCurrentLevel()
.
typedef enum {
OSMemoryNotificationLevelAny = -1,
OSMemoryNotificationLevelNormal = 0,
OSMemoryNotificationLevelWarning = 1,
OSMemoryNotificationLevelUrgent = 2,
OSMemoryNotificationLevelCritical = 3
} OSMemoryNotificationLevel;
How the levels are triggered is not documented. SpringBoard is configured to do the following in each memory level:
Killing the active app (jetsam) is not handled by SpringBoard, but launchd.
UPDATE
Pls go through the Apple Reference documents on Memory Management also