...
Windows processes running with elevated privileges can disable paging by locking memory in place using VirtualLock()
(Windows) [MSDN]:
Code Block | ||
---|---|---|
| ||
char *secret; if (VirtualLock(secret, sizeof(secret)) != 0) { /* Handle error */ } /* Create or otherwise obtain some sensitive data */ if (fgets(secret, sizeof(secret), stdin) == EOF) { /* Handle error */ } |
...