diff --git a/proc/meminfo.c b/proc/meminfo.c index 3f949450..719ad3e7 100644 --- a/proc/meminfo.c +++ b/proc/meminfo.c @@ -699,7 +699,7 @@ static int meminfo_read_failed ( such values will be dramatically distorted over those of the host. */ if (mHr(MemAvailable) > mHr(MemTotal)) mHr(MemAvailable) = mHr(MemFree); - mem_used = mHr(MemTotal) - mHr(MemFree) - mHr(derived_mem_cached) - mHr(Buffers); + mem_used = mHr(MemTotal) - mHr(MemAvailable); if (mem_used < 0) mem_used = mHr(MemTotal) - mHr(MemFree); mHr(derived_mem_used) = (unsigned long)mem_used; diff --git a/proc/meminfo.h b/proc/meminfo.h index 0f3d0076..1913abd1 100644 --- a/proc/meminfo.h +++ b/proc/meminfo.h @@ -89,7 +89,7 @@ enum meminfo_item { MEMINFO_MEM_SLAB_UNRECLAIM, // ul_int " MEMINFO_MEM_TOTAL, // ul_int " MEMINFO_MEM_UNEVICTABLE, // ul_int " - MEMINFO_MEM_USED, // ul_int derived from MEM_TOTAL - MEM_BUFFERS - MEM_CACHED_ALL - MEM_FREE + MEMINFO_MEM_USED, // ul_int derived from MEM_TOTAL - MEM_AVAILABLE MEMINFO_MEM_VM_ALLOC_CHUNK, // ul_int /proc/meminfo MEMINFO_MEM_VM_ALLOC_TOTAL, // ul_int " MEMINFO_MEM_VM_ALLOC_USED, // ul_int "