title: "insufficient memory for the Java Runtime Environment " message in eclipse
body: <p>When I run my Java code in Eclipse, I get the following message:</p>
  
  <pre><code>There is insufficient memory for the Java Runtime Environment to continue.
  Native memory allocation (malloc) failed to allocate 4088 bytes for AllocateHeap
  An error report file with more information is saved as:
  E:\Eclipse_Workspace\BTest\hs_err_pid1888.log
  </code></pre>
  
  <p>I have 4GB RAM in my computer.  I have changed my JRE from 1.7 to 1.8 too. But the issue seems un-resolved. I use a Win 8 system with i3 Processor and have around 20gb of free disk space in my C Drive. </p>
  
  <p>Eclipse version: Eclipse Juno Service release 2</p>
  
  <p>I also get this message while starting Eclipse. I have attached the error message screen shot.</p>
  
  <p>What is causing this issue?</p>
  
  <p><img src="https://i.stack.imgur.com/tymHb.png" alt="enter image description here"></p>
  
  <p><strong>Memory parameters in "eclipse.ini" file:</strong></p>
  
  <pre><code>-startup
  plugins/org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar
  --launcher.library
  plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.200.v20120913-144807
  -product
  org.eclipse.epp.package.java.product
  --launcher.defaultAction
  openFile
  --launcher.XXMaxPermSize
  256M
  -showsplash
  org.eclipse.platform
  --launcher.XXMaxPermSize
  256m
  --launcher.defaultAction
  openFile
  -vmargs
  -Dosgi.requiredJavaVersion=1.5
  -Dhelp.lucene.tokenizer=standard
  -Xms40m
  -Xmx512m
  </code></pre>
  
  <p><strong>Resolution:</strong>
  Re-installing eclipse fixed the problem.</p>