Patent ID: 7552293

Claim:
A method for a set of applications to cooperate with an operating system, wherein the operating system provides at least one application of the set of applications a virtual memory, and wherein the operating system maps at least a portion of the virtual memory to a physical memory, said method comprising: receiving, from the operating system, a feedback signal that indicates a memory pressure on the physical memory, wherein the memory pressure comprises a current utilization of the physical memory by the set of applications; determining, by the at least one application of the set of applications, a cost of freeing at least some of its virtual memory based on the memory pressure, the determining comprising: estimating an amount of time to swap one or more pages of the virtual memory between the physical memory and a storage device, and estimating an amount of time to discard data in the one or more pages of the virtual memory and recalculate the data; and releasing, by the at least one application, at least some of its virtual memory based on the cost of freeing and the feedback signal.