title: Does GC release back memory to OS?
body: <p>When the garbage collector runs and releases memory does this memory go back to the OS or is it being kept as part of the process. I was under the strong impression that the memory is never actually released back to OS but kept as part of the memory area/pool to be reused by the same process.</p>
  
  <p>As a result the actual memory of a process would never decrease. <a href="http://www.cplusplus-soup.com/2010/01/freedelete-not-returning-memory-to-os.html" rel="noreferrer">An article</a> that reminded me was this and Java’s Runtime is written in C/C++ so I guess the same thing applies?</p>
  
  <p><strong>Update</strong><br>
  My question is about Java. I am mentioning C/C++ since I assume the Java’s allocation/deallocation is done by JRE using some form of malloc/delete</p>