Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 21d3f513 authored by Rafal Slawik's avatar Rafal Slawik
Browse files

Parse /proc/pid/status for memory only once

Read and parse /proc/pid/status for native processes only once.
Previously, it was read twice (getUidForPid and read*FromProcfs) and
regular expressions were applied to its contents few times.

A single read also allowed to simplify the code: use null to represent
failed read.

Bug: 140986627
Test: atest ProcfsMemoryUtilTest
Test: atest UidAtomTests#testProcessMemorySnapshot
Test: atest UidAtomTests#testProcessMemoryHighWaterMark
Test: atest UidAtomTests#testNativeProcessMemoryState
Change-Id: I09d05b663f99602fcfacae253af7349989d48749
parent a620de30
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment