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を取得し、ORORproc/<pid>/smapsファイルを取得してメモリ使用量を取得しますproc/<pid>/stat。proc/<pid>/statm
proc/<pid>/smaps
proc/<pid>/stat
proc/<pid>/statm
誰かがそのファイルからメモリ使用量を取得する方法、または他の方法を教えてもらえますか?