Are passwords stored in memory safe?
If you can't trust the OS you're screwed regardless. If you are concerned about physical access based attacks (like cold boot) then there are alternatives.Here's some interesting reading: http://en.wikipedia.org/wiki/TRESOR