mirror of
https://github.com/xzeldon/htop.git
synced 2025-07-10 03:04:36 +03:00
Hold only a const version of the ProcessList in Meters
This commit is contained in:

committed by
cgzones

parent
f757810f48
commit
72103e9613
@ -189,7 +189,7 @@ double Platform_setCPUValues(Meter* this, int cpu) {
|
||||
}
|
||||
|
||||
void Platform_setMemoryValues(Meter* this) {
|
||||
ProcessList* pl = (ProcessList*) this->pl;
|
||||
const ProcessList* pl = this->pl;
|
||||
long int usedMem = pl->usedMem;
|
||||
long int buffersMem = pl->buffersMem;
|
||||
long int cachedMem = pl->cachedMem;
|
||||
@ -207,7 +207,7 @@ void Platform_setMemoryValues(Meter* this) {
|
||||
* Taken almost directly from OpenBSD's top(1)
|
||||
*/
|
||||
void Platform_setSwapValues(Meter* this) {
|
||||
ProcessList* pl = (ProcessList*) this->pl;
|
||||
const ProcessList* pl = this->pl;
|
||||
struct swapent *swdev;
|
||||
unsigned long long int total, used;
|
||||
int nswap, rnswap, i;
|
||||
|
Reference in New Issue
Block a user