title: Why is there are max heap setting in Java?
body: <p>After readings <a href="https://stackoverflow.com/questions/1179983/how-many-characters-can-a-java-string-have">How many characters can a Java String have?</a> I started wonder wonder:</p>
  
  <p>Why is there are max heap setting in current JVMs? Why not just request more memory from the operating system when heap memory runs out and the garbage collector was unable to free needed memory? Does anybody know the rationale behind it?</p>