diff -r 48780e181b38 -r 578be2adaf3e Symbian3/PDK/Source/GUID-0371FD21-D988-4560-891F-2840C36AB2E2.dita --- a/Symbian3/PDK/Source/GUID-0371FD21-D988-4560-891F-2840C36AB2E2.dita Tue Jul 20 12:00:49 2010 +0100 +++ b/Symbian3/PDK/Source/GUID-0371FD21-D988-4560-891F-2840C36AB2E2.dita Fri Aug 13 16:47:46 2010 +0100 @@ -1,54 +1,54 @@ - - - - - -Out -of Memory Error -

An Out of Memory (OOM) error occurs if an application allocates large amount -of RAM in too short time. In such situations, the free RAM level drops as -the application allocates RAM faster than the OOM Monitor can release RAM -from other applications.

-

To avoid this OOM Monitor has the KOomMaxAllocationWithoutPermission constant. -It defines the maximum amount of RAM that an application can safely allocate -within two seconds without OOM Monitor's permission.

-

The KOomMaxAllocationWithoutPermission value defined -in the OOM Monitor header file cannot not be modified. The RAM can be allocated -quickly in small pieces as long as the total amount of allocated RAM within -two seconds is less than KOomMaxAllocationWithoutPermission.

-

If an application needs to allocate more RAM than KOomMaxAllocationWithoutPermission value, -it must request permission from the OOM Monitor. OOM Monitor provides two -different methods for this purpose.

OOM error can still occur in the following situations:

- -

Therefore it is important that all applications are prepared to handle -OOM errors.

-
Closing an -application on the OOM Monitor request

To avoid an OOM error, applications -must terminate itself without any delay whenever the OOM Monitor requests -so. Otherwise the time of free RAM amount below LOW_RAM_THRESHOLD gets -longer and another application can allocate RAM during that time resulting -in an OOM error.

Applications when closed by the OOM Monitor receives EEikCmdExit event.

+ + + + + +Out +of Memory Error +

An Out of Memory (OOM) error occurs if an application allocates large amount +of RAM in too short time. In such situations, the free RAM level drops as +the application allocates RAM faster than the OOM Monitor can release RAM +from other applications.

+

To avoid this OOM Monitor has the KOomMaxAllocationWithoutPermission constant. +It defines the maximum amount of RAM that an application can safely allocate +within two seconds without OOM Monitor's permission.

+

The KOomMaxAllocationWithoutPermission value defined +in the OOM Monitor header file cannot not be modified. The RAM can be allocated +quickly in small pieces as long as the total amount of allocated RAM within +two seconds is less than KOomMaxAllocationWithoutPermission.

+

If an application needs to allocate more RAM than KOomMaxAllocationWithoutPermission value, +it must request permission from the OOM Monitor. OOM Monitor provides two +different methods for this purpose.

    +
  • ROomMonitorSession::RequestFreeMemory() is used +for mandatory RAM allocation. For more information, refer to Allowing +Large Memory Allocation.

  • +
  • ROomMonitorSession::RequestOptionalRam() is used +for optional RAM allocation. For more information, refer to Allowing +Optional RAM Allocation.

  • +
OOM error can still occur in the following situations:

+
    +
  • An application allocates more than KOomMaxAllocationWithoutPermission amount +of RAM within two seconds without OOM Monitor's permission. And the OOM Monitor +cannot release the RAM fast enough for the application.

  • +
  • An application allocates less than KOomMaxAllocationWithoutPermission amount +of RAM within two seconds but

      +
    • some applications do not release RAM quickly enough when requested +(OR)

    • +
    • several applications allocate RAM at the same time.

    • +
  • +
+

Therefore it is important that all applications are prepared to handle +OOM errors.

+
Closing an +application on the OOM Monitor request

To avoid an OOM error, applications +must terminate itself without any delay whenever the OOM Monitor requests +so. Otherwise the time of free RAM amount below LOW_RAM_THRESHOLD gets +longer and another application can allocate RAM during that time resulting +in an OOM error.

Applications when closed by the OOM Monitor receives EEikCmdExit event.

\ No newline at end of file