MPLAB® X IDE - Lack of Memory error
If you receive an error in MPLAB® X IDE related to Lack of Memory, you can edit the mplab_ide.conf file which is in the \MPLABX\v[version]\mplab_ide\etc folder. You will see a note telling you what to edit, as the one shown below:
In the following default_options line, the -J-Xmx option specifying the max heap space (the max amount of memory MPLAB X can use) is not included. This is because the JRE itself will look at the environment where it is being run and will select an appropriate value. This value is typically 1/4 of the max amount of memory in the system. If you want to allocate a larger value for the amount of memory you can add -J-XmxVALUE. For example, -J-Xmx4096m will make the upper limit be 4 gigabytes. However, if this machine has less than 2 gigabytes the installer will add -J-Xmx512m so MPLAB X can run smoothly.
default_options="-J-Dcrownking.stream.verbosity=very-quiet -J-Xss2m -J-Xms256m -J-Xmx930m -J-Dapple.awt.graphics.UseQuartz=true -J-XX:+CMSClassUnloadingEnabled -J-Dapt.limit.expanded.params=1000 -J-Dplugin.manager.check.interval=EVERY_DAY -J-Dsun.java2d.noddraw=true"