title: When you exit a C application, is the malloc-ed memory automatically freed?
body: <p>Let's say I have the following C code:</p>
  
  <pre><code>int main () {
    int *p = malloc(10 * sizeof *p);
    *p = 42;
    return 0;  //Exiting without freeing the allocated memory
  }
  </code></pre>
  
  <p>When I compile and execute that C program, ie after allocating some space in memory, will that memory I allocated be still allocated (ie basically taking up space) after I exit the application and the process terminates? </p>