I've got 2GB of RAM and the resource monitor shows that it's only used about 75%. However there are some apps (NetBeans, Visual Studio) that every once in a while start making a lot of hard faults (up to and over 2000/min), thus predictably slowing down to a crawl. How is this so? The memory usage during these "fits" doesn't change. Perhaps it also includes memory mapped files or something?
Windows – Why are there hard faults when the RAM is not 100% used
memorywindows
Related Solutions
If you have process explorer, check under Kernel memory - when my nvidia graphics driver crashes, I leak about 2gb of memory into there.
If you're looking at the paging lists in process explorer, it breaks down as follows: Zeroed - These pages are unused and have been overwritten with zeroes. Free - These pages aren't allocated at all. Modified - An application has changed this page, and it needs to be written to disk before it can be replaced. ModifiedNoWrite - An application has changed this page, but it doesn't need to be written back before being replaced. Standby - These pages were recently in use. If they are needed, then they can be reallocated to another application. The priority levels below show how likely windows thinks the page is going to be needed again. If an application uses a page once every second, then if windows reallocates that page to another application, it'll have to allocate it back every second, so that's not very useful if we have a page that was used 20 min ago by a background application and hasn't been used since that we could reallocate instead of shifting the same page back and forth between two applications every second. Your "available" memory is Zeroed+Free+Modified+ModifiedNoWrite+Standby
As for fixing it, if it's a driver that's crashing or leaking memory, you just have to replace the driver with a newer or older version that doesn't have this problem. Sadly I don't know of any way to see how much memory is allocated to each driver, though on a high-end system with 150 processes and 50000 handles open (steam, WoW, several editors, google chrome w/40 tabs), I'm using about 500mb of paged physical kernel memory, 500mb of paged virtual kernel memory, and 150mb of nonpaged kernel memory. If you're off by whole gigabytes when it's complaining about memory issues, a driver is misbehaving somewhere. The rest of your memory should be accounted for in the process list.
The Standby memory is not a problem, it is considered "free" and will be reallocated on request - it just contains memory recently used by programs, but is now freed. If another program requests more memory than is "Free" the system should allocate from the Standby set seamlessly (since "standby" memory isn't really in use at the moment).
Your excessive Modified memory is your problem, because it cannot be reallocated easily. See here. It's likely to be caused by either a memory leak (which seems to correspond with your first paragraph - what programs are leaking?) or a page-file being too small (is your page file fixed size or deactivated?).
Best Answer
When a program is started, it is not necessarily completely loaded into memory, just enough is loaded that is required at any given time. When program code is called that is not yet in physical RAM, a page fault (or hard fault) is raised and the OS will load the required part of the program. You computer may be reporting that a program is consuming, say, 100MB of memory, when most of that memory is still on the drive and yet to be paged into physical RAM.