A similar problem is a core dump (after a crash, for example), when memory content ends up in log files.
As a reminder, in production you shouldn't be producing core dumps. Either disable the generation during kernel compilation or through utilities (like ulimit).
Note that under Linux you can in fact do selective core-dumps that skip some sections of memory.
This is usually used when an application has large sections that are not relevant for debugging, but could prove useful to keep private keys out of disk as well.