Skip to content

Instantly share code, notes, and snippets.

@dodola
Created April 4, 2013 14:02
Show Gist options
  • Save dodola/5310616 to your computer and use it in GitHub Desktop.
Save dodola/5310616 to your computer and use it in GitHub Desktop.
Android 获取系统已使用的内存
long total=Runtime.getRuntime().totalMemory();//获取系统内存总数
long free=Runtime.getRuntime().freeMemory();//获取剩余内存
long used=total-free;//获取已使用内存
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment