et/2014/09/24/. This code reimplements the algorithm outlined here: https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/ commit/?id=34e431b0ae398fc54ea69ff85ec700722c9da773 We use this function also when "MemAvailable" returns 0 (possibly a kernel bug, see: https://github.com/giampaolo/psutil/issues/1915). In that case this routine matches "free" CLI tool result ("available" column). XXX: on recent kernels this calculation may differ by ~1.5% compared to "MemAvailable:", as it's calculated slightly differently. It is still way more realistic than doing (free + cached) though. See: * https://gitlab.com/procps-ng/procps/issues/42 * https://github.com/famzah/linux-memavailable-procfs/issues/2 ó