title: Where's the clipboard stored in memory? Can it be swapped?
body: <h2>Context:</h2>
  
  <p>I'm starting to develop a password manager (Just for learning purposes). My goal right now is to copy the decrypted password to the clipboard, so it can be used somewhere else. In order to avoid decrypted passwords being swapped I had to <a href="http://linux.die.net/man/2/mlock" rel="nofollow">mlock</a> the sensitive data</p>
  
  <h2>Questions:</h2>
  
  <p>My concern now is: If I copy the decrypted password to clipboard, could it be swapped? Is there some way to prevent it from being swapped?</p>
  
  <h2>Bonus Questions:</h2>
  
  <p>Where in memory space is clipboard actually stored? It's in the memory space of the process which called the clipboard to store data or it's in OS memory space?</p>
  
  <p>Is posible to keep the password encrypted in the clipboard and just decrypt it when user pastes it? Like an event or a signal</p>
  
  <p>If it's OS dependent, explain differences.</p>