summaryrefslogtreecommitdiffstats
path: root/dragonflybsd
diff options
context:
space:
mode:
authorNathan Scott <nathans@redhat.com>2020-11-27 13:22:21 +1100
committerBenBE <BenBE@geshi.org>2020-11-27 07:55:58 +0100
commitf704baeb8211815f80a166c6837f421a82e1c515 (patch)
treebe935b1d2e39ac409aa7960824bab3cba8fb05a5 /dragonflybsd
parentfee217551c12754db517d1badd448fc9064a48a8 (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 'dragonflybsd')
-rw-r--r--dragonflybsd/DragonFlyBSDProcessList.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/dragonflybsd/DragonFlyBSDProcessList.c b/dragonflybsd/DragonFlyBSDProcessList.c
index 3574b269..940ec03d 100644
--- a/dragonflybsd/DragonFlyBSDProcessList.c
+++ b/dragonflybsd/DragonFlyBSDProcessList.c
@@ -253,12 +253,6 @@ static inline void DragonFlyBSDProcessList_scanMemoryInfo(ProcessList* pl) {
pl->cachedMem *= pageSizeKb;
pl->usedMem = dfpl->memActive + dfpl->memWire;
- //currently unused, same as with arc, custom meter perhaps
- //sysctl(MIB_vm_stats_vm_v_inactive_count, 4, &(dfpl->memInactive), &len, NULL, 0);
- //sysctl(MIB_vm_stats_vm_v_free_count, 4, &(dfpl->memFree), &len, NULL, 0);
- //pl->freeMem = dfpl->memInactive + dfpl->memFree;
- //pl->freeMem *= pageSizeKb;
-
struct kvm_swap swap[16];
int nswap = kvm_getswapinfo(dfpl->kd, swap, ARRAYSIZE(swap), 0);
pl->totalSwap = 0;
@@ -269,8 +263,6 @@ static inline void DragonFlyBSDProcessList_scanMemoryInfo(ProcessList* pl) {
}
pl->totalSwap *= pageSizeKb;
pl->usedSwap *= pageSizeKb;
-
- pl->sharedMem = 0; // currently unused
}
char* DragonFlyBSDProcessList_readProcessName(kvm_t* kd, struct kinfo_proc* kproc, int* basenameEnd) {

© 2014-2024 Faster IT GmbH | imprint | privacy policy