Described herein is 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. At a first memory usage threshold,
the operating system requests at least one of the application programs to limit
its use of memory. At a second memory usage threshold that is more critical than
the first memory usage threshold, the operating system requests at least one of
the application programs to close itself. At a third memory usage threshold that
is more critical than the first and second memory usage thresholds, the operating
system terminates at least one of the application programs without allowing its
further execution.