mirror of
https://github.com/xzeldon/htop.git
synced 2025-07-12 12:14:36 +03:00
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.
This commit is contained in:
@ -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) {
|
||||
|
Reference in New Issue
Block a user