diff options
author | Nathan Scott <nathans@redhat.com> | 2020-11-27 13:22:21 +1100 |
---|---|---|
committer | BenBE <BenBE@geshi.org> | 2020-11-27 07:55:58 +0100 |
commit | f704baeb8211815f80a166c6837f421a82e1c515 (patch) | |
tree | be935b1d2e39ac409aa7960824bab3cba8fb05a5 /openbsd | |
parent | fee217551c12754db517d1badd448fc9064a48a8 (diff) |
Drop unused global ProcessList memory fields
The global ProcessList structure contains a couple of unused
fields. 'sharedMem' has never been used by any Meter, since
its not been anything other than zero in Linux /proc/meminfo
for many, many years. The freeMem field is only used in the
usedMem calculation, so it can reside on the stack like some
other memory variables used within-calculations-only and not
exposed to the user via a Meter.
Diffstat (limited to 'openbsd')
-rw-r--r-- | openbsd/OpenBSDProcessList.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/openbsd/OpenBSDProcessList.c b/openbsd/OpenBSDProcessList.c index cc3de5bb..f1ebb344 100644 --- a/openbsd/OpenBSDProcessList.c +++ b/openbsd/OpenBSDProcessList.c @@ -103,7 +103,6 @@ static inline void OpenBSDProcessList_scanMemoryInfo(ProcessList* pl) { } pl->cachedMem = bcstats.numbufpages * CRT_pageSizeKB; - pl->freeMem = uvmexp.free * CRT_pageSizeKB; pl->usedMem = (uvmexp.npages - uvmexp.free - uvmexp.paging) * CRT_pageSizeKB; /* @@ -114,7 +113,6 @@ static inline void OpenBSDProcessList_scanMemoryInfo(ProcessList* pl) { pl->totalMem /= 1024; sysctl(MIB_vm_stats_vm_v_wire_count, 4, &(pl->usedMem), &len, NULL, 0); pl->usedMem *= CRT_pageSizeKB; - pl->freeMem = pl->totalMem - pl->usedMem; sysctl(MIB_vm_stats_vm_v_cache_count, 4, &(pl->cachedMem), &len, NULL, 0); pl->cachedMem *= CRT_pageSizeKB; @@ -129,7 +127,6 @@ static inline void OpenBSDProcessList_scanMemoryInfo(ProcessList* pl) { pl->totalSwap *= CRT_pageSizeKB; pl->usedSwap *= CRT_pageSizeKB; - pl->sharedMem = 0; // currently unused pl->buffersMem = 0; // not exposed to userspace */ } |