title: There is insufficient memory for the Java Runtime Environment to continue with spark-submit
body: <p>I am running pyspark job </p>
  
  <pre><code>spark-submit --driver-memory 2g --executor-memory 2g  --conf spark.driver.maxResultSize=2g job.py
  </code></pre>
  
  <p>I tried changing multiple options but every time i am getting below error:</p>
  
  <h1>OpenJDK 64-Bit Server VM warning: INFO: os::commit_memory(0x000000072324e000, 985616384, 0) failed; error='Cannot allocate memory' (errno=12)</h1>
  
  <h1>There is insufficient memory for the Java Runtime Environment to continue.</h1>
  
  <h1>Native memory allocation (mmap) failed to map 985616384 bytes for committing reserved memory.</h1>
  
  <h1>An error report file with more information is saved as:</h1>
  
  <p>I am new to spark can some one help me out what should be the solution with this.</p>