title: Accessing memory used by other program
body: <p>Today I've a weird question again (at least to me it is). I'm experimenting more into pointers and an idea arouse in my mind as follows:</p>
  
  <h3>The Code (only a portion of it)</h3>
  
  <pre><code>int * firefoxmemory = (char*) 0x11111111 //this is just an example of address.
  *firefoxmemory = 200;
  </code></pre>
  
  <h3>The Question:</h3>
  
  <p>In the above code, I try to access memory used by firefox (I use a memory editor to view the address) and after that change its corresponding value. But when I try to do so my program crashes.</p>
  
  <p>Why does this happen to my program? Is there some special code used by Firefox to prevent a 3rd party program from tampering with its memory? Or it's done by the Windows and Intel hardware DEP?</p>
  
  <p>If the above action is prevented by DEP, why does some memory editing software still work, like cheat engines that can alter values in memory?</p>