Windows - How can I flush modified memory?

12,628

Solution 1

Windows can't write them to the disk, because they are still in use. The only way to "free" this memory is to enable a pagefile, so that the modified pages are written to the pagefile. Here they can be restored into the RAM when they are needed again.

Solution 2

hanksterr7 had the answer I was looking for. After a few days of having my computer on, I would be at up to 10 GB modified memory usage, about 14 GB total usage (out of 16 GB). I couldn't run any games without getting a low memory warning. I was ready to uninstall Chrome because I thought it had developed a memory leak.

Adding the 'Handles' column to task manager identified a Realtek Network Adapter updater that I installed with drivers for a new 5Ghz 802.11ac WiFi USB adapter that I bought about a month ago. It was using almost 500k handles, compared to anywhere from 30-1500 handles for other processes.

Thanks for this tip hanksterr7. You had the real solution that I was looking for.

Solution 3

Figuring out what is consuming your modified memory is not obvious. I found that by adding the "handles" column in task manager, processes tab, I could identify the process that was locking modified memory. Killing that process made the modified memory get released.

Share:
12,628

Related videos on Youtube

test
Author by

test

Updated on September 18, 2022

Comments

  • test
    test over 1 year

    This is a follow up on my previous question, here:
    Windows modified memory without a pagefile - Super User

    I have no pagefile and a lot of modified memory according to resource monitor (Win 7 x64). The answerer to my original question said that the modified memory must be written to the "backing store" and when I asked if he meant files on the disk he said yes. So I have Sysinternals' RamMap program and I've tried the option 'Empty Modified Page List' but nothing changes.

    Right now I'm using gigabytes of modified memory and it seems it's always that way with VMWare Workstation (several VMs open) and Firefox (ton of tabs open). How can I flush the modified memory, and is there any way to make Windows do that more often short of enabling a pagefile?

    Thanks

    EDIT - I've since discovered the source of several gigs of modified memory came from running Sysinternals' Process Monitor. When I closed Process Monitor I got back a few gigs. That modified memory does not show in the process list in RAMMap.

  • iTechieGamer
    iTechieGamer about 6 years
    This is not an answer to the question; this is simply commenting on hanksterr7's answer.
  • Lewis Kelsey
    Lewis Kelsey about 5 years
    So how is this done? Page file backed memory would be written to the page file if it is modified but this assumes that there is a certain known and permanent location where the PFN is stored on the page file such that it can retrieved from the page file again (if that weren't the case it would have to write to the page file every time a page is paged out even if it is not modified). The PTE gets a pointer to the index into the page file of the PFN and the corresponding page so the memory managing code knows where to page it back in from. The issue is, the next time ...
  • Lewis Kelsey
    Lewis Kelsey about 5 years
    .. it needs to page the page out to the page file it needs to use exactly the same index again in order to get the benefit of not having to write if it is not modified as it is already there, therefore this index needs to be permanently stored somewhere for each page so that it can be used again. And it needs to be stored for each page rather than PFN because the PFN can change when it pages it in to a new location.
  • Lewis Kelsey
    Lewis Kelsey about 5 years
    Every time a page is paged in to a new PFN, it still needs to reference the same location in the pagefile, otherwise it's have to write non-modified pages as well
  • John Moser
    John Moser almost 3 years
    "Modified" pages are not written to page file. They're modified because software writes to it and the OS goes "cool, the file is written" and has a copy of that file still in memory, instead of re-reading disk every time it wants it. In other words: the modified memory IS the file. They're not distinct.