Use MemAvailable to better estimate free memory
Apps can call ActivityManager#getMemoryInfo to get an estimate for the amount of free memory in the system. This is calculated as MemFree + Cached, from /proc/meminfo. However, /proc/meminfo also exposes MemAvailable, which more accurately estimates free memory. For details, see https://git.kernel.org/torvalds/c/34e431b. On low-RAM TV devices, MemFree + Cached significantly overestimates free memory, so switching to MemAvailable would improve performance by encouraging apps to use a more appropriate amount of memory. Bug: 340918025 Test: manual - with logging in ActivityManagerService#getMemoryInfo Change-Id: I477b6ea944993627a5af6603256ebaaaffb84778
Loading
Please register or sign in to comment