diff options
author | ru <ru@FreeBSD.org> | 2006-11-28 12:46:02 +0000 |
---|---|---|
committer | ru <ru@FreeBSD.org> | 2006-11-28 12:46:02 +0000 |
commit | 3b8270a3d54536f75863cb20eeed53f240d24ba5 (patch) | |
tree | 54a4571abbdb6a65f55daa94a9fdb8f8253b31fb /sys/sys/vmmeter.h | |
parent | dec1d110aeb2a55ab4ada2307d9fe7440425153d (diff) | |
download | FreeBSD-src-3b8270a3d54536f75863cb20eeed53f240d24ba5.zip FreeBSD-src-3b8270a3d54536f75863cb20eeed53f240d24ba5.tar.gz |
- Revert signedness type changes to "struct vmtotal"; by making
them unsigned I made the possible overflows hard to detect,
and it only saved 1 bit which isn't principal, even less now
that the underlying issue with the total of virtual memory has
been fixed. (For the record, it will overflow with >=2T of
VM total, with 32-bit ints used to keep counters in pages.)
- While here, fix printing of other "struct vmtotal" members
such as t_rq, t_dw, t_pw, and t_sw as they are also signed.
Reviewed by: bde
MFC after: 3 days
Diffstat (limited to 'sys/sys/vmmeter.h')
-rw-r--r-- | sys/sys/vmmeter.h | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/sys/sys/vmmeter.h b/sys/sys/vmmeter.h index a0b8cd2..793f32d 100644 --- a/sys/sys/vmmeter.h +++ b/sys/sys/vmmeter.h @@ -191,20 +191,20 @@ vm_paging_needed(void) /* systemwide totals computed every five seconds */ struct vmtotal { - uint16_t t_rq; /* length of the run queue */ - uint16_t t_dw; /* jobs in ``disk wait'' (neg priority) */ - uint16_t t_pw; /* jobs in page wait */ - uint16_t t_sl; /* jobs sleeping in core */ - uint16_t t_sw; /* swapped out runnable/short block jobs */ - uint32_t t_vm; /* total virtual memory */ - uint32_t t_avm; /* active virtual memory */ - uint32_t t_rm; /* total real memory in use */ - uint32_t t_arm; /* active real memory */ - uint32_t t_vmshr; /* shared virtual memory */ - uint32_t t_avmshr; /* active shared virtual memory */ - uint32_t t_rmshr; /* shared real memory */ - uint32_t t_armshr; /* active shared real memory */ - uint32_t t_free; /* free memory pages */ + int16_t t_rq; /* length of the run queue */ + int16_t t_dw; /* jobs in ``disk wait'' (neg priority) */ + int16_t t_pw; /* jobs in page wait */ + int16_t t_sl; /* jobs sleeping in core */ + int16_t t_sw; /* swapped out runnable/short block jobs */ + int32_t t_vm; /* total virtual memory */ + int32_t t_avm; /* active virtual memory */ + int32_t t_rm; /* total real memory in use */ + int32_t t_arm; /* active real memory */ + int32_t t_vmshr; /* shared virtual memory */ + int32_t t_avmshr; /* active shared virtual memory */ + int32_t t_rmshr; /* shared real memory */ + int32_t t_armshr; /* active shared real memory */ + int32_t t_free; /* free memory pages */ }; #endif |