MacOS X and its swapfiles
MacOS X does not use a harddisk partition as swapspace, but some files located in /private/var/vm/. This is a quite nice feature, it provides a way to dynamically adjust the swapspace. Today, I searched for my password in the swapfiles (sudo strings swapfile0 | less – the file is only readable and writable by root) and – I found it!
Just one line below my username! Is this necessary?
Why isn’t the memory mlock()ed?
Why aren’t the files not deleted after creation? They would still exist until the last reference (file descriptor) is closed, but there wouldn’t be a interface from userland.