The Palm-size PC shell displays a System Out of Memory dialog box when the OS cannot free memory fast enough for an application or when an application uses more memory than the OS 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 System Modal dialog box that freezes the rest of the system. When it is invoked, socket connections stop functioning, and other threads stop running.
After the System Out of Memory dialog box closes, any applications that were selected by the user are shut down. 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 reappears.
Note The success of an approach that sends the WM_CLOSE messages when memory is low depends on the ability of an application to shut down in response, while allocating little additional memory in the process. If your application requires a significant amount of memory to shut down, try caching the needed memory. For example, you could hide a Do You Want to Save Your Document dialog box, and then make it visible, if you need to close the application unexpectedly.