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)


No comments:
Post a Comment