3 ms·
Those system calls don't really work like that; there isn't really a public way to say "don't save a copy of this page on disk" on Windows, OSX, or Linux. For
by monocasa 8y ago
Those system calls don't really work like that; there isn't really a public way to say "don't save a copy of this page on disk" on Windows, OSX, or Linux.
For instance see Raymond Chen's explanation here
> Is VirtualLock safe to use for cryptographic purposes – that is, to avoid sensitive memory being written to disk?
> ...
> [There does not appear to be any guarantee that the memory won't be written to disk while locked. As you noted, the machine may be hibernated, or it may be running in a VM that gets snapshotted. -Raymond]
VirtualLock and the equivalents only guarantee that the canonical copy of that page stays in RAM, not that other copies won't make their way out to disk.
Edit: add link https://blogs.msdn.microsoft.com/oldnewthing/20140207-00/?p=1833 https://blogs.msdn.microsoft.com/oldnewthing/20140207-00/?p=...