mardi 31 mars 2015

Does closing a handle on a file release the associated memory in Windows?

I am analyzing the performance of a product on Windows platform. Will closing the handle on that file using the CloseHandle() function flush the contents to the disk and remove it from the RAM? Windows Platform : Windows Server 2008 R2 as a VM


Edit : I am analyzing a database product. And we are seeing sudden decrement in the RAM usage. I went through the MSDN for CloseHandle and see a line which says "After the last handle to an object is closed, the object is removed from the system." The word system here is not clear. We are already using FlushFileBuffers() to persist data before Closing the last Handle. Since database files can be huge, FlushFileBuffers() can result in a lot of disk I/O. Can using the Windows Server as VM degrade the performance of disk I/O?


Aucun commentaire:

Enregistrer un commentaire