System Out of Memory Dialog Box

4/19/2010

The Windows Mobile device shell displays a System Out of Memory dialog box when the operating system cannot free memory fast enough for an application or when an application uses more memory than the operating system has available. This dialog box informs the user that memory is critically low and prompts the user either to close applications or to increase the amount of RAM. The System Out of Memory dialog box is a modal dialog box that, when invoked, halts the rest of the system; socket connections close and running threads stop.

After the System Out of Memory dialog box closes, any applications that were started by the user close. Applications have eight seconds to close. If more memory is requested after four seconds have passed and memory is still critically low, the dialog box reopens.

Note

The success of an approach that sends the WM_CLOSE messages when memory is low depends on the ability of an application to close in response, while allocating little additional memory in the process. If your application requires a significant amount of memory to close, try caching the needed memory.

See Also

Concepts

Handling Application Hibernation
Handling Low Memory States
How to: Determine Available Memory
How to: Determine Battery Status
Preventing Automatic Power Down
How to: Program an Application for Windows Mobile Standard to Turn the Backlight On or Off
How to: Suspend the Device
Managing Variables, Stacks, and Heaps on Windows Mobile Devices
Getting Memory Status and Processor Information

Other Resources

Memory and Power Management