title: JVM is not recognizing my available memory
body: <p>I have a Ubuntu server (20.04) with 4GB RAM. After starting some applications it have 2.5GB of available RAM. When I try to start a java application using a Heap Size of 1GB(-Xms1g -Xmx1g) it wont start and log the following error</p>
  <blockquote>
  <p>There is insufficient memory for the Java Runtime Environment to
  continue. Native memory allocation (mmap) failed to map 1073741824
  bytes for committing reserved memory.</p>
  </blockquote>
  <p>If I try to lower the heap sizes to 512m or lower it will start but after a couple of minutes the service stop with similar error even if I have half of the memory available.
  It look like JVM is not using/recognizing all the available memory.</p>
  <p>Any help is appreciated.</p>