A method for managing a memory is provided which comprises the steps of: receiving
a request for a memory allocation from a first application, the request comprising
a requested memory amount; estimating a total amount of a memory available to the
first application; freeing a partition of the memory sufficient for the first application
based on the requested memory amount; and allocating the partition to the first
application. The memory can be freed in a number of ways, including, by shutting
down other applications based upon a priority or priority state scheme, issuing
a shut down request to another application, or by allowing the user to select an
application to be shut down.