Is it possible to write a program that uses only physical RAM, and not the swap/pagefile in Windows?
November 30, 2006 4:26 AM   Subscribe

Is it possible to write a program that uses only physical RAM, and not the swap/pagefile in Windows?

I am trying to write a program that won't leave any traces on a computer after it is run. As it currently stands, it leaves lots of signatures in the swap file. Terribly annoying.
posted by torpark to Computers & Internet (5 answers total)
 
You could allocate a buffer from the non-paged pool. But easier than that would be calling SecureZeroMemory() on all buffers which ought to take care of the page file as well.
posted by Rhomboid at 4:44 AM on November 30, 2006


See also the DPAPI (CryptProtectMemory() and friends).
posted by Rhomboid at 4:47 AM on November 30, 2006


I had thought that there was no way to guarantee from where allocated heap memory came from in win32?
posted by cmicali at 5:59 AM on November 30, 2006


Could you add a lot of ram and disable swapping?
posted by stereo at 7:52 AM on November 30, 2006


In Unix you'd mlock() the memory. The Windows equivilent appears to be VirtualLock().
posted by Freaky at 11:15 AM on November 30, 2006


« Older Instructions on book page folding   |   looking for a big fat pmp Newer »
This thread is closed to new comments.