0
Is there a Windows application or script that can free modified memory
belonging to a given application.
I have tried Flush File Cache which is great as a big ol' hammer to clean out all modified memory
but I need an application or script that can purge the memory that was allocated for a given application rather than the whole system.
System Specs
Windows 7 64 bit
8 GB RAM
12873 MB PageFile
SuperFetch Turned Off
A bit of background
I have created a Node Webkit application that processes lots of images, creating an image in memory and then discarding it. The initial implementation was leaking memory as I could see the commit size ballooning until Windows started to give out of memory warnings.
After a lot of rewrites the application's commit size stays around a good average and never really goes up, but what happens instead is the modified memory
grows steadily (but much more slowly than before). This happens because the application allocates memory for the images and now deallocates them properly. Once the application stops processing the images but is still running, the modified memory
slowly goes down back to normal without any intervention. If I run Flush File Cache with the all
option it cleans out a whole host of unused memory without affecting my application (although the whole system slows down to a crawl momentarily as expected).
Update
Added a few screenshots to show what happens when 4 of them run simultaneously, nearing the end when free memory
is critically low and standby memory
is at around 1GB.
(apologies, can't post images yet because of my rep in this sub)
2Why do you believe this is required? It shouldn't be required. Most memory intensive applications do not do this. Why do you believe you will get any performance boosts from flushing the modified memory? – Ramhound – 2015-02-09T15:46:16.760
I still get out of memory warnings, just much later. However when I purged the memory today the modified memory dropped from a 1GB down to 300MB and everything was still fine. I plan to run multiples of this application on the same machine so the memory will run out much faster and the stuff in modified memory is really not needed. – Hayko Koryun – 2015-02-09T15:50:06.013
Are you running out of virtual memory or physical memory? Because I actually have designed an application similar to yours ( based on the small description ) and didn't have this problem. – Ramhound – 2015-02-09T16:24:06.053
I think both, first the virtual then physical. I have added screenshots to show the state of the RAM whilst running the app and immediately after. – Hayko Koryun – 2015-02-09T20:40:09.907
You have over 1GB free. Have you tried to increase your page file? – Ramhound – 2015-02-09T21:07:45.577
1
so it looks like there's a bug in Chromium when resizing the canvas so it's something I will have to work around, so the original question stands...
– Hayko Koryun – 2015-02-10T08:05:28.973