System Out of Memory Dialog Box

The Windows Mobile-based 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 allocated to program memory. The System Out of Memory dialog box is a modal dialog box that, when invoked, freezes the rest of the system; socket connections stop functioning and other threads stop running.

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

Application Hibernation

Handling Low Memory States

How to: Determine Available Memory

How to: Determine Battery Status

How to: Prevent Automatic Power Down

How to: Suspend the Device

Managing Variables, Stacks, and Heaps on Mobile Devices

Memory and Power Management

Memory Status and Information

Send feedback on this topic to the authors.

© 2005 Microsoft Corporation. All rights reserved.