title: Is it possible to save program data in RAM even when the program is closed?
body: <p>Essentially what I'm wondering is if I wanted to persist data in RAM between program executions; as in could I store information in RAM after the program finishes if I write down where in RAM I'm going to save it. Could I do something like so:</p>
  
  <pre><code>int *p = 10;
  send_to_database(p); // Send the location in memory to some server
  p = null_ptr;
  del p;
  
  The program finishes running
  
  The program starts running again
  int *p;
  p = get_from_db(user_token);
  </code></pre>
  
  <p>I suppose what I'm really wondering is could I intentionally leak memory but come back to it later? It wouldn't get taken care of by any type of garbage collection because we would simply forget about the location of it for now. Then the next time I run the program I look up where I stored something in RAM and load it back in.</p>
  
  <p>Just so no one is horrified, this is a purely theoretical question. It just occurred to me that you could do some kind of really funky user authentication with this where it only persists their login as long as the computer is not shut off. Since the auth token would get saved to a different location on everyone's computer it strikes me that it would be difficult to rummage up the location of the auth token when the program is closed.</p>