找到文件/Applications/Android Studio.app/Contents/bin/studio.vmoptions
然后修改下面的配置,重启Android Studio即可。
1 #
2 # *DO NOT* modify this file directly. If there is a value that you would like to override,
3 # please add it to your user specific configuration file.
4 #
6 #
7 -Xms256m
8 -Xmx1280m
9 -XX:MaxPermSize=350m
10 -XX:ReservedCodeCacheSize=240m
11 -XX:+UseCompressedOops
要想在Android Studio上实时显示这个内存使用情况呢,可以Setting->Appearance->Window Options->Show Memory indicator勾选上。