Go to/create file: /Users/aselims/Library/Preferences/AndroidStudio2.2/studio.vmoptions
Configure those options according to your RAM limits:
-Xms512m
-Xmx4096m
-XX:MetaspaceSize=512m
-XX:MaxPermSize=1024m
-XX:ReservedCodeCacheSize=512m
-XX:+UseCompressedOops
Configure those options according to your RAM limits:
-Xms512m
-Xmx4096m
-XX:MetaspaceSize=512m
-XX:MaxPermSize=1024m
-XX:ReservedCodeCacheSize=512m
-XX:+UseCompressedOops