...
Processes with elevated privileges can disable paging by locking memory in place using the POSIX mlock()
function [Open Group 2004]. This ensures that memory is never copied to the hard drive, where it may be retained indefinitely in nonvolatile storage.
This compliant solution not only disables the creation of core files but also ensures that the buffer is not swapped to hard disk.
...
Bibliography
[Open Group 204] mlock()
, setrlimit()
[Wheeler 2003] Sections 7.14 and 11.4
...