diff options
author | Daniel Lange <DLange@git.local> | 2022-06-03 08:55:20 +0200 |
---|---|---|
committer | Daniel Lange <DLange@git.local> | 2022-06-03 08:55:20 +0200 |
commit | 937052b231259a47d881d539ad5748245ef55b99 (patch) | |
tree | 41071229fa007d8cf6902bb9253d2acd8cc66979 /freebsd/Platform.c | |
parent | 1b805a31720727008b32b1129a167758519fd4db (diff) | |
download | debian_htop-937052b231259a47d881d539ad5748245ef55b99.tar.gz debian_htop-937052b231259a47d881d539ad5748245ef55b99.tar.bz2 debian_htop-937052b231259a47d881d539ad5748245ef55b99.zip |
New upstream version 3.2.1upstream/3.2.1
Diffstat (limited to 'freebsd/Platform.c')
-rw-r--r-- | freebsd/Platform.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/freebsd/Platform.c b/freebsd/Platform.c index d21fc80..1a731b7 100644 --- a/freebsd/Platform.c +++ b/freebsd/Platform.c @@ -227,6 +227,7 @@ double Platform_setCPUValues(Meter* this, unsigned int cpu) { void Platform_setMemoryValues(Meter* this) { const ProcessList* pl = this->pl; + const FreeBSDProcessList* fpl = (const FreeBSDProcessList*) pl; this->total = pl->totalMem; this->values[0] = pl->usedMem; @@ -234,6 +235,16 @@ void Platform_setMemoryValues(Meter* this) { // this->values[2] = "shared memory, like tmpfs and shm" this->values[3] = pl->cachedMem; // this->values[4] = "available memory" + + if (fpl->zfs.enabled) { + // ZFS does not shrink below the value of zfs_arc_min. + unsigned long long int shrinkableSize = 0; + if (fpl->zfs.size > fpl->zfs.min) + shrinkableSize = fpl->zfs.size - fpl->zfs.min; + this->values[0] -= shrinkableSize; + this->values[3] += shrinkableSize; + // this->values[4] += shrinkableSize; + } } void Platform_setSwapValues(Meter* this) { |