How to get total RAM size of a device?

前端 未结 5 524
囚心锁ツ
囚心锁ツ 2020-12-01 08:20

I want to get full RAM size of a device. memoryInfo.getTotalPss() returns 0. There is not function for get total RAM size in ActivityManager.MemoryInfo.

5条回答
  •  悲&欢浪女
    2020-12-01 08:23

    Standard unix command: $ cat /proc/meminfo

    Note that /proc/meminfo is a file. You don't actually have to run cat, you can simply read the file.

提交回复
热议问题