aboutsummaryrefslogtreecommitdiff
path: root/sys/sys/vmmeter.h
diff options
context:
space:
mode:
authorRuslan Ermilov <ru@FreeBSD.org>2006-11-20 16:04:41 +0000
committerRuslan Ermilov <ru@FreeBSD.org>2006-11-20 16:04:41 +0000
commit5c88a11e6ecbdb249da4ea006de1d486b13c328c (patch)
tree4492f0248b0817ad7a3f6e447b1c16b1f57bfac9 /sys/sys/vmmeter.h
parent681efe08347bbf750276ccf4825ae6865129be01 (diff)
downloadsrc-5c88a11e6ecbdb249da4ea006de1d486b13c328c.tar.gz
src-5c88a11e6ecbdb249da4ea006de1d486b13c328c.zip
- 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.)
Notes
Notes: svn path=/head/; revision=164443
Diffstat (limited to 'sys/sys/vmmeter.h')
-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 793f32d37738..a0b8cd24b2a1 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