Clearing Disk Cache
-
I'm currently trying to speed up my app by identifying code bottlenecks. The problem I find is that when some disk accesses have taken place they are now cached by Windows. Anyone know how I could empty / wipe out the disk cache please? Thanks
-
I'm currently trying to speed up my app by identifying code bottlenecks. The problem I find is that when some disk accesses have taken place they are now cached by Windows. Anyone know how I could empty / wipe out the disk cache please? Thanks
Do you mean you want to test or speed up the process launch and you find your process is already cached in the windows cache? FlushInstructionCache -> Process instruction cache is flushed (but not the data) FlushFileBuffers -> Call this for every open file handle and all writes are performed. (purges write cache) use FILE_FLAG_WRITE_THROUGH in the file create or open call. (disables write caching) more interesting than the above blabla is http://www.sysinternals.com/cacheset.htm