From 3b8270a3d54536f75863cb20eeed53f240d24ba5 Mon Sep 17 00:00:00 2001 From: ru Date: Tue, 28 Nov 2006 12:46:02 +0000 Subject: - 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 --- sys/sys/vmmeter.h | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'sys/sys/vmmeter.h') 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 -- cgit v1.1