Patent ID: 8056081

Claim:
A method of controlling memory usage in a computer system having limited physical memory, wherein one or more application programs execute in conjunction with an operating system, the method comprising: setting a plurality of memory thresholds; and at increasingly critical memory thresholds, correspondingly increasing control over the one or more application programs to reduce memory usage, the increasing control comprising: reclaiming unused stack memory and discarding read-only memory as a result that a memory usage reaches one or more of the memory thresholds; determining that the reclaiming and discarding does not free enough memory for the memory usage; at a first memory threshold, communicating a request to at least one of the application programs for the at least one of the application programs to limit its use of the physical memory; and at a second memory threshold, terminating at least one of the application programs without allowing its further execution, the second memory threshold being more critical than the first memory threshold.