Problem:
I run a WSL AlmaLinux with 15_000M allocated RAM, and launch my Java application via IntelliJ, on a OpenJDK 64-Bit.
I need to increase the max heap memory available to my Java application, but it caps at 4_093M.
Attempts:
I have tried to increase the max and initial heap memory:
- By adding:
-Xms12288m
-Xmx12288m
To:
PATH_TO_INTELLIJ/232.8660.185.vmoptionsAnd to:
PATH_TO_INTELLIJ/bin/idea64.vmoptions
- By running:
export _JAVA_OPTIONS="-Xms12288m -Xmx12288m"
- Trying both methods with lower heap memory sizes.
Results:
This did not increased the heap memory as confirmed:
- By the RES field in top:
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
5123 usr 20 0 9991.9m 3.5g 21896 S 672.7 22.9 74:06.11 java
- By JProfiler:
Profile of a run launched via IntelliJ
- By
Runtime.getRuntime().totalMemory():
4093M
If you have any idea (pun unintended), please let me know!