No, unfortunately. When they swap out, they end up on disk. Sector remapping can then keep them there, even if swap space is reused.
I think there is an API in windows to mark a small part of memory as unswappable, but it can't be very big.
I think there is an API in windows to mark a small part of memory as unswappable, but it can't be very big.
https://wiki.archlinux.org/title/Dm-crypt/Swap_encryption
Does someone know how it's handled on Windows and macOS?