My cordApp is using a 3rd party service that require more heap space but i am unable to increase the heap size limit while running it from IntelliJ IDEA. I have seen following docs:
but i want more heap space while i run my app on mock network from intellij IDE. I have tried following solutions:
- Setting VM Option -Xmx1048m in run configrations
- Editing idea.vmoptions
- (Mac) Changing Preferences > Build,Execution,Deployment > Compiler [params]
- (Mac) Changing Preferences > Build,Execution,Deployment > Compiler > Kotlin Compiler [params]
Every time i run
Runtime.getRuntime().maxMemory()
i get heapsize of around 209715200 bytes (209 MBs)
Edit:
idea.vmoptions file
-Xms1g
-Xmx4g
-XX:ReservedCodeCacheSize=240m
-XX:+UseCompressedOops
-Dfile.encoding=UTF-8
-XX:+UseConcMarkSweepGC
-XX:SoftRefLRUPolicyMSPerMB=50
-ea
-Dsun.io.useCanonCaches=false
-Djava.net.preferIPv4Stack=true
-XX:+HeapDumpOnOutOfMemoryError
-XX:-OmitStackTraceInFastThrow
-Xverify:none
-XX:ErrorFile=$USER_HOME/java_error_in_idea_%p.log
-XX:HeapDumpPath=$USER_HOME/java_error_in_idea.hprof
-Xbootclasspath/a:../lib/boot.jar