Skip to content

Instantly share code, notes, and snippets.

@irsalshabirin
Created September 20, 2021 10:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save irsalshabirin/9233f07e7d0cec7dc9ad77f5ea1207e2 to your computer and use it in GitHub Desktop.
Save irsalshabirin/9233f07e7d0cec7dc9ad77f5ea1207e2 to your computer and use it in GitHub Desktop.
Custom VM Options - Android Studio
-XX:MaxPermSize=1024m
-XX:ReservedCodeCacheSize=240m
-XX:+UseCompressedOops
-XX:+UseConcMarkSweepGC
-XX:SoftRefLRUPolicyMSPerMB=50
-XX:-HeapDumpOnOutOfMemoryError
-XX:ErrorFile=$USER_HOME/java_error_in_studio_%p.log
-XX:HeapDumpPath=$USER_HOME/java_error_in_studio.hprof
-Dfile.encoding=UTF-8
-Dsun.io.useCanonCaches=false
-Djava.net.preferIPv4Stack=true
-Djdk.http.auth.tunneling.disabledSchemes=""
-Djna.nosys=true
-Djna.boot.library.path=
-da
-Xverify:none
# ###############################################
# custom settings from https://github.com/artem-zinnatullin/AndroidStudio-VM-Options/blob/master/studio.vmoptions
# ###############################################
# Runs JVM in Server mode with more optimizations and resources usage
# It may slow down the startup, but if you usually keep IDE running for few hours/days
# JVM may profile and optimize IDE better. Feel free to remove this flag.
-server
# Sets the initial size of the heap, default value is 256m
-Xms1G
# Max size of the memory allocation pool, default value is 1280m
-Xmx4G
# Sets the size of the allocated class metadata space that will trigger a GC the first time it is exceeded, default max value is 350m
-XX:MetaspaceSize=512m