summaryrefslogtreecommitdiffstats
path: root/sys/sys
diff options
context:
space:
mode:
authorru <ru@FreeBSD.org>2006-11-20 16:04:41 +0000
committerru <ru@FreeBSD.org>2006-11-20 16:04:41 +0000
commit1ea77e90a7ba6eb03ef9b3fc9b7d651d068676a2 (patch)
tree4492f0248b0817ad7a3f6e447b1c16b1f57bfac9 /sys/sys
parentb38795bee6d9520e36b7e2161f05eeaeb5a0f719 (diff)
downloadFreeBSD-src-1ea77e90a7ba6eb03ef9b3fc9b7d651d068676a2.zip
FreeBSD-src-1ea77e90a7ba6eb03ef9b3fc9b7d651d068676a2.tar.gz
- Fix types of "struct vmmeter" members so they are unsigned.
- Fix overflow bugs in sysctl(8), systat(1), and vmstat(8) when printing values of "struct vmmeter" in kilobytes as they don't necessarily fit into 32 bits. (Fix sysctl(8) reporting of a total virtual memory; it's in pages too.)
Diffstat (limited to 'sys/sys')
-rw-r--r--sys/sys/vmmeter.h28
1 files changed, 14 insertions, 14 deletions
diff --git a/sys/sys/vmmeter.h b/sys/sys/vmmeter.h
index 793f32d..a0b8cd2 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 {
- 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 */
+ 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 */
};
#endif
OpenPOWER on IntegriCloud