Clearmem.exe: Clear MemoryNEW


ClearMem is a command-line tool that forces pages out of RAM.

ClearMem attempts to allocate and commit more memory then is physically available, as well as flushing the file cache. In Windows, working sets are allowed to grow until memory pressure forces them to decline. Flushing the file cache is important because some pages in the process working set are part of the file cache (for example, code loaded from a file).

Running ClearMem twice will usually force most applications out of memory. ClearMem has to run multiple times to present a real-life memory load because the system does not immediately trim all possible pages in a process working set, but does so gradually over time. When ClearMem runs, the system pauses because of the flood of high priority activity.


note-icon

Note

Use Vadump to see the contents of the working set.

To run ClearMem, the computer's paging file must be at least as large as its RAM. If you are running Windows Server configured for "Maximize Throughput for Network Applications," you might have to run ClearMem more than twice to reduce application working sets to the minimum. Use System Monitor to check on progress.

Working Sets

The working set is a set of memory pages. It is all the physical pages "owned" by a process. Each memory page can be:

ClearMem Topics

File Required