increasing_heap_memory.adoc 1.3 KB

1234567891011121314151617181920212223
  1. = Increasing Heap Memory in the jMonkeyEngine SDK
  2. :revnumber: 2.0
  3. :revdate: 2020/07/10
  4. :keywords: documentation, sdk, faq
  5. If you've been working on a large scene in the SDK, there is a good chance that you will need to increase the size of Java's heap space (which is quite small by default).
  6. To increase the amount of heap space allocated to the SDK, we must navigate to the SDK's installation directory and edit the etc/jmonkeyplatform.conf file.
  7. The installation directory for Mac and Windows is:
  8. *+++<abbr title="Operating System">OS</abbr>+++ X:* Applications/jmonkeyplatform.app/Contents/Resources/jmonkeyplatform/jmonkeyplatform
  9. *Windows:* C:\Program Files\jmonkeyplatform
  10. Tweaking the parameters to be right is quite a task because sometimes when specifying a too large value, the JRE might fall back to it's default value of (for example) 32 +++<abbr title="Megabyte">MB</abbr>+++. Also there are different values to increase. Take a look at your Error Message, it will show you whether you ran out of "`Heap Space`" or "`Direct Memory`".
  11. In the config file you look for default_options="`.`"
  12. If you ran out of Heap Space increase the Value of -Xmx=512m to like 1024m or even further.
  13. If you ran out of Direct Memory, increase -XX:MaxDirectMemorySize=256M
  14. Note that Increasing the Heap Space might also fix problems where you ran out of DirectMemory.