Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在开发一个 Android 应用程序,以每秒获取另一个 android 应用程序的内存使用情况。
我启动一个后台服务,然后使用它的包名运行其他应用程序。然后我获取该应用程序的 PID,并获取proc/<pid>/smapsOR proc/<pid>/statORproc/<pid>/statm文件以获取内存使用情况。
proc/<pid>/smaps
proc/<pid>/stat
proc/<pid>/statm
有人可以指导我如何从该文件或任何其他方法中获取内存使用情况吗?