<commit_before>= Increasing Heap Memory in the jMonkeyEngine SDK
:author:
:revnumber:
:revdate: 2016/03/17 20:48
:keywords: documentation, sdk, faq
:relfileprefix: ../
:imagesdir: ..
ifdef::env-github,env-browser[:outfilesuffix: .adoc]


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). 

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.

The installation directory for Mac and Windows is:

*+++<abbr title="Operating System">OS</abbr>+++ X:* Applications/jmonkeyplatform.app/Contents/Resources/jmonkeyplatform/jmonkeyplatform

*Windows:* C:\Program Files\jmonkeyplatform

Tweaking the parameters to be right is quite a task because sometimes when specifing 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.

In the config file you look for default_options=“.
If you ran out of Heap Space increase the Value of -Xmx=512m to like 1024m or even further.
If you ran out of Direct Memory, increase -XX:MaxDirectMemorySize=256M

Note that Increasing the Heap Space might also fix problems where you ran out of DirectMemory.<commit_msg>fix header and smart quotes<commit_after>= Increasing Heap Memory in the jMonkeyEngine SDK
:revnumber: 2.0
:revdate: 2020/07/10
:keywords: documentation, sdk, faq


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).

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.

The installation directory for Mac and Windows is:

*+++<abbr title="Operating System">OS</abbr>+++ X:* Applications/jmonkeyplatform.app/Contents/Resources/jmonkeyplatform/jmonkeyplatform

*Windows:* C:\Program Files\jmonkeyplatform

Tweaking the parameters to be right is quite a task because sometimes when specifing 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`".

In the config file you look for default_options="`.`"
If you ran out of Heap Space increase the Value of -Xmx=512m to like 1024m or even further.
If you ran out of Direct Memory, increase -XX:MaxDirectMemorySize=256M

Note that Increasing the Heap Space might also fix problems where you ran out of DirectMemory.
{'fraction_non_alphanumeric': 0.07328033183546491, 'fraction_numerical': 0.015900449360525405, 'mean_word_length': 4.906122448979592, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2761485', 'n_tokens_mistral': 855, 'n_tokens_neox': 788, 'n_words': 412}